Class OnlyofficeDocumentEditorPlugin
java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.onlyoffice.documents.OnlyofficeDocumentEditorPlugin
- All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin,org.exoplatform.services.cms.documents.DocumentEditor
public class OnlyofficeDocumentEditorPlugin
extends org.exoplatform.container.component.BaseComponentPlugin
implements org.exoplatform.services.cms.documents.DocumentEditor
The Class OnlyOfficeNewDocumentEditorPlugin.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe Class Error.protected static classThe Class EditorSetting. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringThe Constant CLIENT_RESOURCE_PREFIX.protected final CometdOnlyofficeServiceThe cometd service.protected static final StringThe Constant DRIVES.protected static final longThe Constant EDITING_FINISHED_DELAY.protected static final StringThe Constant EDITOR_LINK_NOT_FOUND_ERROR.protected static final StringThe Constant EDITOR_LINK_NOT_FOUND_ERROR_MESSAGE.The editor links.protected final OnlyofficeEditorServiceThe editor service.protected final org.exoplatform.services.resources.ResourceBundleServiceThe i 18 n service.protected static final StringThe Constant INTERNAL_EDITOR_ERROR.protected static final StringThe Constant INTERNAL_EDITOR_ERROR_MESSAGE.protected final org.exoplatform.services.cms.link.LinkManagerThe link manager.protected static final org.exoplatform.services.log.LogThe Constant LOG.protected static final StringThe Constant PREVIEW.protected static final StringThe Constant PROVIDER_CONFIGURATION_PARAM.protected static final StringThe Constant PROVIDER_NAME.protected static final StringThe Constant STORAGE_ERROR.protected static final StringThe Constant STORAGE_ERROR_MESSAGE.protected static final StringThe Constant STREAM.protected final org.exoplatform.services.cms.documents.DocumentUpdateActivityHandlerThe update handler.Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin
desc, name -
Constructor Summary
ConstructorsConstructorDescriptionOnlyofficeDocumentEditorPlugin(OnlyofficeEditorService editorService, org.exoplatform.services.resources.ResourceBundleService i18nService, CometdOnlyofficeService cometdService, org.exoplatform.services.cms.link.LinkManager linkManager) Instantiates a new OnlyOffice new document editor plugin. -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeDocumentCreate(org.exoplatform.services.cms.documents.NewDocumentTemplate template, String parentPath, String title) On document create.org.exoplatform.services.cms.documents.DocumentUpdateActivityHandlerGets the document update handler.longGets the provider name.voidinitActivity(String uuid, String workspace, String activityId) Inits the activity.initPreview(String fileId, String workspace, URI requestUri, Locale locale) Inits the preview.booleanisDocumentSupported(String fileId, String workspace) Checks if is document supported.voidonDocumentCreated(String workspace, String path) On document created.voidonLastEditorClosed(String fileId, String workspace) On last editor closed.Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin
getDescription, getName, setDescription, setNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.exoplatform.services.cms.documents.DocumentEditor
getPermissions, isActive
-
Field Details
-
PROVIDER_NAME
The Constant PROVIDER_NAME.- See Also:
-
EDITING_FINISHED_DELAY
protected static final long EDITING_FINISHED_DELAYThe Constant EDITING_FINISHED_DELAY.- See Also:
-
PROVIDER_CONFIGURATION_PARAM
The Constant PROVIDER_CONFIGURATION_PARAM.- See Also:
-
EDITOR_LINK_NOT_FOUND_ERROR
The Constant EDITOR_LINK_NOT_FOUND_ERROR.- See Also:
-
EDITOR_LINK_NOT_FOUND_ERROR_MESSAGE
The Constant EDITOR_LINK_NOT_FOUND_ERROR_MESSAGE.- See Also:
-
STORAGE_ERROR
The Constant STORAGE_ERROR.- See Also:
-
STORAGE_ERROR_MESSAGE
The Constant STORAGE_ERROR_MESSAGE.- See Also:
-
INTERNAL_EDITOR_ERROR
The Constant INTERNAL_EDITOR_ERROR.- See Also:
-
INTERNAL_EDITOR_ERROR_MESSAGE
The Constant INTERNAL_EDITOR_ERROR_MESSAGE.- See Also:
-
LOG
protected static final org.exoplatform.services.log.Log LOGThe Constant LOG. -
STREAM
The Constant STREAM.- See Also:
-
PREVIEW
The Constant PREVIEW.- See Also:
-
DRIVES
The Constant DRIVES.- See Also:
-
CLIENT_RESOURCE_PREFIX
The Constant CLIENT_RESOURCE_PREFIX.- See Also:
-
editorService
The editor service. -
i18nService
protected final org.exoplatform.services.resources.ResourceBundleService i18nServiceThe i 18 n service. -
cometdService
The cometd service. -
linkManager
protected final org.exoplatform.services.cms.link.LinkManager linkManagerThe link manager. -
editorLinks
The editor links. -
updateHandler
protected final org.exoplatform.services.cms.documents.DocumentUpdateActivityHandler updateHandlerThe update handler.
-
-
Constructor Details
-
OnlyofficeDocumentEditorPlugin
public OnlyofficeDocumentEditorPlugin(OnlyofficeEditorService editorService, org.exoplatform.services.resources.ResourceBundleService i18nService, CometdOnlyofficeService cometdService, org.exoplatform.services.cms.link.LinkManager linkManager) Instantiates a new OnlyOffice new document editor plugin.- Parameters:
editorService- the editor servicei18nService- the i18nServicecometdService- the cometdServicelinkManager- the link manager
-
-
Method Details
-
getProviderName
Gets the provider name.- Specified by:
getProviderNamein interfaceorg.exoplatform.services.cms.documents.DocumentEditor- Returns:
- the provider name
-
onDocumentCreated
On document created.- Specified by:
onDocumentCreatedin interfaceorg.exoplatform.services.cms.documents.DocumentEditor- Parameters:
workspace- the workspacepath- the path- Throws:
Exception- the exception
-
beforeDocumentCreate
public void beforeDocumentCreate(org.exoplatform.services.cms.documents.NewDocumentTemplate template, String parentPath, String title) throws Exception On document create.- Specified by:
beforeDocumentCreatein interfaceorg.exoplatform.services.cms.documents.DocumentEditor- Parameters:
template- the templateparentPath- the parent pathtitle- the title- Throws:
Exception- the exception
-
initActivity
Inits the activity.- Specified by:
initActivityin interfaceorg.exoplatform.services.cms.documents.DocumentEditor- Parameters:
uuid- the uuidworkspace- the workspaceactivityId- the activity id- Throws:
Exception- the exception
-
initPreview
public OnlyofficeDocumentEditorPlugin.EditorSetting initPreview(String fileId, String workspace, URI requestUri, Locale locale) Inits the preview.- Specified by:
initPreviewin interfaceorg.exoplatform.services.cms.documents.DocumentEditor- Parameters:
fileId- the uuidworkspace- the workspacerequestUri- the requestUrilocale- the locale- Returns:
- editor settings
-
isDocumentSupported
Checks if is document supported.- Specified by:
isDocumentSupportedin interfaceorg.exoplatform.services.cms.documents.DocumentEditor- Parameters:
fileId- the file idworkspace- the workspace- Returns:
- true, if is document supported
-
getDocumentUpdateHandler
public org.exoplatform.services.cms.documents.DocumentUpdateActivityHandler getDocumentUpdateHandler()Gets the document update handler.- Specified by:
getDocumentUpdateHandlerin interfaceorg.exoplatform.services.cms.documents.DocumentEditor- Returns:
- the document update handler
-
onLastEditorClosed
On last editor closed.- Specified by:
onLastEditorClosedin interfaceorg.exoplatform.services.cms.documents.DocumentEditor- Parameters:
fileId- the file idworkspace- the workspace
-
getEditingFinishedDelay
public long getEditingFinishedDelay()- Specified by:
getEditingFinishedDelayin interfaceorg.exoplatform.services.cms.documents.DocumentEditor
-