Class CometdOnlyofficeService.CometdService

  • Enclosing class:
    CometdOnlyofficeService

    @Service("onlyoffice")
    public class CometdOnlyofficeService.CometdService
    extends Object
    The CometService is responsible for sending messages to Cometd channels when a document is saved.
    • Constructor Detail

      • CometdService

        public CometdService()
    • Method Detail

      • postConstruct

        @PostConstruct
        public void postConstruct()
        Post construct.
      • subscribeDocuments

        @Subscription("/eXo/Application/Onlyoffice/editor/{docId}")
        public void subscribeDocuments​(org.cometd.bayeux.Message message,
                                       @Param("docId")
                                       String docId)
                                throws OnlyofficeEditorException,
                                       javax.jcr.RepositoryException
        Subscribe document events.
        Parameters:
        message - the message.
        docId - the docId.
        Throws:
        OnlyofficeEditorException - the onlyoffice editor exception
        javax.jcr.RepositoryException - the repository exception
      • handleDocumentLinkEvent

        protected void handleDocumentLinkEvent​(Map<String,​Object> data,
                                               String docId)
        Handle document link event.
        Parameters:
        data - the data
        docId - the doc id
      • handleDocumentTitleUpdatedEvent

        protected void handleDocumentTitleUpdatedEvent​(Map<String,​Object> data,
                                                       String docId)
        Handle document title updated.
        Parameters:
        data - the data
        docId - the doc id
      • handleEditorClosedEvent

        protected void handleEditorClosedEvent​(Map<String,​Object> data,
                                               String docId)
        Handle editor closed event.
        Parameters:
        data - the data
        docId - the doc id
      • handleDocumentVersionEvent

        protected void handleDocumentVersionEvent​(Map<String,​Object> data,
                                                  String docId)
        Handle document version event.
        Parameters:
        data - the data
        docId - the doc id
      • handleDocumentChangeEvent

        protected void handleDocumentChangeEvent​(Map<String,​Object> data,
                                                 String docId)
        Handle document change event.
        Parameters:
        data - the data
        docId - the doc id
      • handleDocumentUsersavedEvent

        protected void handleDocumentUsersavedEvent​(Map<String,​Object> data,
                                                    String docId)
        Handles document usersaved event.
        Parameters:
        data - the data
        docId - the docId
      • publishSavedEvent

        protected void publishSavedEvent​(String docId,
                                         String userId,
                                         String comment)
        Publish saved event.
        Parameters:
        docId - the doc id
        userId - the user id
        comment - the comment
      • publishContentUpdatedEvent

        protected void publishContentUpdatedEvent​(String workspace,
                                                  String docId,
                                                  String userId)
        Publish saved event.
        Parameters:
        workspace - the workspace
        docId - the doc id
        userId - the user id
      • publishDeletedEvent

        protected void publishDeletedEvent​(String docId)
        Publish deleted event.
        Parameters:
        docId - the doc id