Class CometdOnlyofficeService.CometdService
java.lang.Object
org.exoplatform.onlyoffice.cometd.CometdOnlyofficeService.CometdService
- Enclosing class:
- CometdOnlyofficeService
The CometService is responsible for sending messages to Cometd channels
when a document is saved.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidhandleDocumentChangeEvent(Map<String, Object> data, String docId) Handle document change event.protected voidhandleDocumentLinkEvent(Map<String, Object> data, String docId) Handle document link event.protected voidhandleDocumentTitleUpdatedEvent(Map<String, Object> data, String docId) Handle document title updated.protected voidhandleDocumentUsersavedEvent(Map<String, Object> data, String docId) Handles document usersaved event.protected voidhandleDocumentVersionEvent(Map<String, Object> data, String docId) Handle document version event.protected voidhandleEditorClosedEvent(Map<String, Object> data, String docId) Handle editor closed event.voidPost construct.protected voidpublishContentUpdatedEvent(String workspace, String docId, String userId) Publish saved event.protected voidpublishDeletedEvent(String docId) Publish deleted event.protected voidpublishSavedEvent(String docId, String userId, String comment) Publish saved event.voidsubscribeDocuments(org.cometd.bayeux.Message message, String docId) Subscribe document events.
-
Constructor Details
-
CometdService
public CometdService()
-
-
Method Details
-
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 exceptionjavax.jcr.RepositoryException- the repository exception
-
handleDocumentLinkEvent
Handle document link event.- Parameters:
data- the datadocId- the doc id
-
handleDocumentTitleUpdatedEvent
Handle document title updated.- Parameters:
data- the datadocId- the doc id
-
handleEditorClosedEvent
Handle editor closed event.- Parameters:
data- the datadocId- the doc id
-
handleDocumentVersionEvent
Handle document version event.- Parameters:
data- the datadocId- the doc id
-
handleDocumentChangeEvent
Handle document change event.- Parameters:
data- the datadocId- the doc id
-
handleDocumentUsersavedEvent
Handles document usersaved event.- Parameters:
data- the datadocId- the docId
-
publishSavedEvent
Publish saved event.- Parameters:
docId- the doc iduserId- the user idcomment- the comment
-
publishContentUpdatedEvent
Publish saved event.- Parameters:
workspace- the workspacedocId- the doc iduserId- the user id
-
publishDeletedEvent
Publish deleted event.- Parameters:
docId- the doc id
-