Class CometdOnlyofficeService.CometdService
- java.lang.Object
-
- org.exoplatform.onlyoffice.cometd.CometdOnlyofficeService.CometdService
-
- Enclosing class:
- CometdOnlyofficeService
@Service("onlyoffice") public class CometdOnlyofficeService.CometdService extends ObjectThe CometService is responsible for sending messages to Cometd channels when a document is saved.
-
-
Constructor Summary
Constructors Constructor Description CometdService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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.voidpostConstruct()Post 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.
-
-
-
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.RepositoryExceptionSubscribe document events.- Parameters:
message- the message.docId- the docId.- Throws:
OnlyofficeEditorException- the onlyoffice editor exceptionjavax.jcr.RepositoryException- the repository exception
-
handleDocumentLinkEvent
protected void handleDocumentLinkEvent(Map<String,Object> data, String docId)
Handle document link event.- Parameters:
data- the datadocId- the doc id
-
handleDocumentTitleUpdatedEvent
protected void handleDocumentTitleUpdatedEvent(Map<String,Object> data, String docId)
Handle document title updated.- Parameters:
data- the datadocId- the doc id
-
handleEditorClosedEvent
protected void handleEditorClosedEvent(Map<String,Object> data, String docId)
Handle editor closed event.- Parameters:
data- the datadocId- the doc id
-
handleDocumentVersionEvent
protected void handleDocumentVersionEvent(Map<String,Object> data, String docId)
Handle document version event.- Parameters:
data- the datadocId- the doc id
-
handleDocumentChangeEvent
protected void handleDocumentChangeEvent(Map<String,Object> data, String docId)
Handle document change event.- Parameters:
data- the datadocId- the doc id
-
handleDocumentUsersavedEvent
protected void handleDocumentUsersavedEvent(Map<String,Object> data, String docId)
Handles document usersaved event.- Parameters:
data- the datadocId- the docId
-
publishSavedEvent
protected void publishSavedEvent(String docId, String userId, String comment)
Publish saved event.- Parameters:
docId- the doc iduserId- the user idcomment- the comment
-
publishContentUpdatedEvent
protected void publishContentUpdatedEvent(String workspace, String docId, String userId)
Publish saved event.- Parameters:
workspace- the workspacedocId- the doc iduserId- the user id
-
publishDeletedEvent
protected void publishDeletedEvent(String docId)
Publish deleted event.- Parameters:
docId- the doc id
-
-