public class OfficeOnlineDocumentEditorPlugin
extends org.exoplatform.container.component.BaseComponentPlugin
implements org.exoplatform.services.cms.documents.DocumentEditor
| Modifier and Type | Class and Description |
|---|---|
static class |
OfficeOnlineDocumentEditorPlugin.EditorError
The Class Error.
|
protected static class |
OfficeOnlineDocumentEditorPlugin.EditorSetting
The Class EditorSetting.
|
| Modifier and Type | Field and Description |
|---|---|
protected static String |
CLIENT_RESOURCE_PREFIX
The Constant CLIENT_RESOURCE_PREFIX.
|
protected CometdOfficeOnlineService |
cometdService
The cometd service.
|
protected static long |
EDITING_FINISHED_DELAY
The Constant EDITING_FINISHED_DELAY.
|
protected static String |
EDITOR_LINK_NOT_FOUND_ERROR
The Constant EDITOR_LINK_NOT_FOUND_ERROR.
|
protected static String |
EDITOR_LINK_NOT_FOUND_ERROR_MESSAGE
The Constant EDITOR_LINK_NOT_FOUND_ERROR_MESSAGE.
|
protected Map<javax.jcr.Node,String> |
editorLinks
The editor links.
|
protected static String |
EXO_SYMLINK
The Constant EXO_SYMLINK.
|
protected org.exoplatform.services.resources.ResourceBundleService |
i18nService
The i 18 n service.
|
protected static String |
INTERNAL_EDITOR_ERROR
The Constant INTERNAL_EDITOR_ERROR.
|
protected static String |
INTERNAL_EDITOR_ERROR_MESSAGE
The Constant INTERNAL_EDITOR_ERROR_MESSAGE.
|
protected static org.exoplatform.services.log.Log |
LOG
The Constant LOG.
|
protected static String |
PROVIDER_CONFIGURATION_PARAM
The Constant PROVIDER_CONFIGURATION_PARAM.
|
protected static String |
PROVIDER_NAME
The Constant PROVIDER_NAME.
|
protected static String |
STORAGE_ERROR
The Constant STORAGE_ERROR.
|
protected static String |
STORAGE_ERROR_MESSAGE
The Constant STORAGE_ERROR_MESSAGE.
|
protected org.exoplatform.services.cms.documents.DocumentUpdateActivityHandler |
updateHandler
The update handler.
|
protected WOPIService |
wopiService
The wopi service.
|
| Constructor and Description |
|---|
OfficeOnlineDocumentEditorPlugin(WOPIService wopiService,
org.exoplatform.services.resources.ResourceBundleService i18nService,
CometdOfficeOnlineService cometdService)
Instantiates a new office online document editor plugin.
|
| Modifier and Type | Method and Description |
|---|---|
void |
beforeDocumentCreate(org.exoplatform.services.cms.documents.NewDocumentTemplate template,
String parentPath,
String title) |
org.exoplatform.services.cms.documents.DocumentUpdateActivityHandler |
getDocumentUpdateHandler()
Gets the document update handler.
|
long |
getEditingFinishedDelay()
Gets the editing finished delay.
|
protected String |
getEditorLink(javax.jcr.Node node,
URI requestURI)
Returns editor link, adds it to the editorLinks cache.
|
String |
getProviderName() |
void |
initActivity(String uuid,
String workspace,
String activityId)
Inits the activity.
|
OfficeOnlineDocumentEditorPlugin.EditorSetting |
initExplorer(String fileId,
String workspace,
org.exoplatform.webui.application.WebuiRequestContext context)
Inits the explorer.
|
OfficeOnlineDocumentEditorPlugin.EditorSetting |
initPreview(String fileId,
String workspace,
URI requestURI,
Locale locale)
Inits the preview.
|
boolean |
isDocumentSupported(String fileId,
String workspace)
Checks if is document supported.
|
void |
onDocumentCreated(String workspace,
String path) |
void |
onLastEditorClosed(String fileId,
String workspace)
On last editor closed handler unlocks node if still locked.
|
getDescription, getName, setDescription, setNameprotected static final org.exoplatform.services.log.Log LOG
protected static final String PROVIDER_NAME
protected static final long EDITING_FINISHED_DELAY
protected static final String PROVIDER_CONFIGURATION_PARAM
protected static final String CLIENT_RESOURCE_PREFIX
protected static final String EDITOR_LINK_NOT_FOUND_ERROR
protected static final String EDITOR_LINK_NOT_FOUND_ERROR_MESSAGE
protected static final String STORAGE_ERROR
protected static final String STORAGE_ERROR_MESSAGE
protected static final String INTERNAL_EDITOR_ERROR
protected static final String INTERNAL_EDITOR_ERROR_MESSAGE
protected static final String EXO_SYMLINK
protected final WOPIService wopiService
protected final org.exoplatform.services.resources.ResourceBundleService i18nService
protected final CometdOfficeOnlineService cometdService
protected final org.exoplatform.services.cms.documents.DocumentUpdateActivityHandler updateHandler
public OfficeOnlineDocumentEditorPlugin(WOPIService wopiService, org.exoplatform.services.resources.ResourceBundleService i18nService, CometdOfficeOnlineService cometdService)
wopiService - the wopi servicei18nService - the i 18 n servicecometdService - the cometd servicepublic void onDocumentCreated(String workspace, String path) throws Exception
onDocumentCreated in interface org.exoplatform.services.cms.documents.DocumentEditorExceptionpublic void beforeDocumentCreate(org.exoplatform.services.cms.documents.NewDocumentTemplate template,
String parentPath,
String title)
throws Exception
beforeDocumentCreate in interface org.exoplatform.services.cms.documents.DocumentEditorExceptionpublic String getProviderName()
getProviderName in interface org.exoplatform.services.cms.documents.DocumentEditorpublic void initActivity(String uuid, String workspace, String activityId) throws Exception
initActivity in interface org.exoplatform.services.cms.documents.DocumentEditoruuid - the uuidworkspace - the workspaceactivityId - the activity idException - the exceptionpublic OfficeOnlineDocumentEditorPlugin.EditorSetting initPreview(String fileId, String workspace, URI requestURI, Locale locale)
initPreview in interface org.exoplatform.services.cms.documents.DocumentEditorfileId - the uuidworkspace - the workspacerequestURI - the requestURIlocale - the localepublic OfficeOnlineDocumentEditorPlugin.EditorSetting initExplorer(String fileId, String workspace, org.exoplatform.webui.application.WebuiRequestContext context)
initExplorer in interface org.exoplatform.services.cms.documents.DocumentEditorfileId - the file idworkspace - the workspacecontext - the contextpublic boolean isDocumentSupported(String fileId, String workspace)
isDocumentSupported in interface org.exoplatform.services.cms.documents.DocumentEditorfileId - the file idworkspace - the workspacepublic org.exoplatform.services.cms.documents.DocumentUpdateActivityHandler getDocumentUpdateHandler()
getDocumentUpdateHandler in interface org.exoplatform.services.cms.documents.DocumentEditorpublic void onLastEditorClosed(String fileId, String workspace)
onLastEditorClosed in interface org.exoplatform.services.cms.documents.DocumentEditorfileId - the file idworkspace - the workspacepublic long getEditingFinishedDelay()
getEditingFinishedDelay in interface org.exoplatform.services.cms.documents.DocumentEditorprotected String getEditorLink(javax.jcr.Node node, URI requestURI) throws javax.jcr.RepositoryException, OfficeOnlineException
node - the noderequestURI - the request URIjavax.jcr.RepositoryException - the repository exceptionOfficeOnlineException - the office online exceptionCopyright © 2003–2020 eXo Platform SAS. All rights reserved.