Class CommentService

All Implemented Interfaces:
AdapterResource, Resource, Adaptable

@Deprecated public class CommentService extends DefaultAdapter
Deprecated.
since 10.3, use org.nuxeo.ecm.restapi.server.jaxrs.comment.CommentAdapter instead.
Comment Service - manages document comments.

Accepts the following methods:

  • POST - create a new comment
Author:
Bogdan Stefanescu, Sun Seng David TAN, rux allow extending the service for the possible customizations. Some atomic actions are provided with default implementation but allowed for overwriting.
  • Constructor Details

    • CommentService

      public CommentService()
      Deprecated.
  • Method Details

    • doPost

      public javax.ws.rs.core.Response doPost(String cText)
      Deprecated.
    • reject

      public javax.ws.rs.core.Response reject()
      Deprecated.
    • approve

      public javax.ws.rs.core.Response approve()
      Deprecated.
    • remove

      public javax.ws.rs.core.Response remove()
      Deprecated.
    • deleteComment

      public javax.ws.rs.core.Response deleteComment()
      Deprecated.
    • getCommentManager

      public static CommentManager getCommentManager()
      Deprecated.
    • getCommentsModerationService

      public static CommentsModerationService getCommentsModerationService()
      Deprecated.
    • createCommentDocument

      protected DocumentModel createCommentDocument(CoreSession session, DocumentModel target, DocumentModel comment)
      Deprecated.
      Can be overwritten to allow creation of localized comment. Defaults to create comment in comments root.
      Parameters:
      session - the core session
      target - commented document
      comment - comment itself
      Returns:
      the comment created
    • publishComment

      protected void publishComment(CoreSession session, DocumentModel target, DocumentModel comment)
      Deprecated.
      Can be overwritten to allow workflow. Defaults to publish right away.
      Parameters:
      session - the core session
      target - commented document
      comment - comment itself
    • deleteComment

      protected void deleteComment(DocumentModel target, DocumentModel comment)
      Deprecated.
      Can be overwritten to allow workflow. Defaults to delete right away.
      Parameters:
      target - commented document
      comment - comment itself
    • rejectComment

      protected void rejectComment(CoreSession session, DocumentModel target, DocumentModel comment)
      Deprecated.
      Can be overwritten to allow workflow. Defaults to reject and delete right away.
      Parameters:
      target - commented document
      comment - comment itself
    • approveComent

      protected void approveComent(CoreSession session, DocumentModel target, DocumentModel comment)
      Deprecated.
      Can be overwritten to allow workflow. Defaults to approve right away.
      Parameters:
      target - commented document
      comment - comment itself