public interface OnlyofficeEditorService
| Modifier and Type | Field and Description |
|---|---|
static String |
EDITOR_OPEN_EVENT |
| Modifier and Type | Method and Description |
|---|---|
void |
addClient(String key,
String userId,
String clientId)
Deprecated.
|
void |
addListener(OnlyofficeEditorListener listener)
Add listener to the service.
|
void |
addTypePlugin(org.exoplatform.container.component.ComponentPlugin plugin)
Adds DocumentTypePlugin to the service to check mimetypes of documents.
|
boolean |
canDownloadBy(String hostName)
Check does given host can download document content by this service.
|
boolean |
canEditDocument(javax.jcr.Node node)
Checks if the node isn't locked and can be edited by the current user.
|
Config |
createEditor(String userSchema,
String userHost,
int userPost,
String userId,
String workspace,
String docId)
Create an editor configuration for given user and node.
|
void |
downloadVersion(String key,
String userId,
String contentUrl)
Creates a new version of a document.
|
DocumentContent |
getContent(String userId,
String fileKey)
Get file content.
|
javax.jcr.Node |
getDocument(String workspace,
String path)
Gets the document node by its path and optionally a repository workspace.
|
javax.jcr.Node |
getDocumentById(String workspace,
String uuid)
Gets the document node by its id and optionally a repository workspace.
|
String |
getDocumentId(javax.jcr.Node node)
Gets the document ID for given node.
|
Config |
getEditor(String userId,
String workspace,
String path)
Return existing editor configuration for given user and node.
|
Config |
getEditorByKey(String userId,
String key)
Return existing editor for given temporal key.
|
String |
getEditorLink(javax.jcr.Node node)
Gets the editor page URL for opening at Platform server relatively to the
current PortalRequest.
|
String |
getEditorLink(String schema,
String host,
int port,
String workspace,
String docId)
Gets the editor page URL for opening at Platform server.
|
Config.Editor.User |
getLastModifier(String key)
Gets the last modifier userId.
|
ChangeState |
getState(String userId,
String fileKey)
Local state of editing document.
|
String |
initDocument(javax.jcr.Node node)
Inits the document and returns an ID for use within editors.
|
String |
initDocument(String workspace,
String path)
Inits the document and returns an ID for use within editors.
|
boolean |
isDocumentMimeSupported(javax.jcr.Node node)
Checks if the node has compatible mime-types.
|
void |
removeClient(String key,
String userId,
String clientId)
Deprecated.
|
void |
removeListener(OnlyofficeEditorListener listener)
Remove listener from the service.
|
void |
setLastModifier(String key,
String userId)
Sets the last modifier userId.
|
void |
updateDocument(String userId,
DocumentStatus status)
Update a configuration associated with given editor
Config
instance. |
static final String EDITOR_OPEN_EVENT
Config getEditor(String userId, String workspace, String path) throws OnlyofficeEditorException, javax.jcr.RepositoryException
null will be returned. If
user not valid then OnlyofficeEditorException will be thrown.userId - Stringworkspace - Stringpath - StringConfig or nullOnlyofficeEditorException - the onlyoffice editor exceptionjavax.jcr.RepositoryException - the repository exceptionConfig getEditorByKey(String userId, String key) throws OnlyofficeEditorException, javax.jcr.RepositoryException
null will be returned. If user not valid then
OnlyofficeEditorException will be thrown.userId - the user idkey - the key, see getEditor(String, String, String)OnlyofficeEditorException - the onlyoffice editor exceptionjavax.jcr.RepositoryException - the repository exceptionConfig createEditor(String userSchema, String userHost, int userPost, String userId, String workspace, String docId) throws OnlyofficeEditorException, javax.jcr.RepositoryException
userSchema - the schemauserHost - the hostuserPost - the user postuserId - Stringworkspace - StringdocId - String a document reference in the workspace, see
initDocument(String, String)Config instance in case of successful creation or
null if local file type not supported.OnlyofficeEditorException - if editor exception happenedjavax.jcr.RepositoryException - if storage exception happenedvoid updateDocument(String userId, DocumentStatus status) throws OnlyofficeEditorException, javax.jcr.RepositoryException
Config
instance. A Node from that the config was created will be updated.
This operation will close the editor and it will not be usable after that.userId - Stringstatus - DocumentStatusOnlyofficeEditorException - if editor exception happenedjavax.jcr.RepositoryException - if storage exception happenedString initDocument(javax.jcr.Node node) throws OnlyofficeEditorException, javax.jcr.RepositoryException
node - the node of the documentOnlyofficeEditorException - the onlyoffice editor exceptionjavax.jcr.RepositoryException - the repository exceptionString initDocument(String workspace, String path) throws OnlyofficeEditorException, javax.jcr.RepositoryException
workspace - the workspacepath - the pathOnlyofficeEditorException - the onlyoffice editor exceptionjavax.jcr.RepositoryException - the repository exceptionString getEditorLink(javax.jcr.Node node) throws OnlyofficeEditorException, javax.jcr.RepositoryException
node - the nodeOnlyofficeEditorException - the onlyoffice editor exceptionjavax.jcr.RepositoryException - the repository exceptionString getEditorLink(String schema, String host, int port, String workspace, String docId)
schema - the schemahost - the hostport - the portworkspace - the workspacedocId - the doc IDjavax.jcr.Node getDocument(String workspace, String path) throws javax.jcr.RepositoryException, BadParameterException
workspace - the workspace, can be null, then a default
one will be usedpath - the path of a documentnull if nothing foundjavax.jcr.RepositoryException - the repository exceptionBadParameterException - the bad parameter exeptionDocumentContent getContent(String userId, String fileKey) throws OnlyofficeEditorException, javax.jcr.RepositoryException
userId - StringfileKey - StringDocumentContentOnlyofficeEditorException - the onlyoffice editor exceptionjavax.jcr.RepositoryException - the repository exceptionboolean canDownloadBy(String hostName)
hostName - Stringtrue if client host with given name can download
document content, false otherwise.ChangeState getState(String userId, String fileKey) throws OnlyofficeEditorException
userId - StringfileKey - StringChangeStateOnlyofficeEditorException - the onlyoffice editor exceptionvoid addListener(OnlyofficeEditorListener listener)
listener - the listenervoid removeListener(OnlyofficeEditorListener listener)
listener - the listenervoid addTypePlugin(org.exoplatform.container.component.ComponentPlugin plugin)
plugin - - the plugin to be addedboolean canEditDocument(javax.jcr.Node node)
throws javax.jcr.RepositoryException
node - the nodejavax.jcr.RepositoryException - the repository exeptionString getDocumentId(javax.jcr.Node node) throws OnlyofficeEditorException, javax.jcr.RepositoryException
null will be returned.node - the nodenullOnlyofficeEditorException - the onlyoffice editor exceptionjavax.jcr.RepositoryException - the repository exceptioninitDocument(String, String),
canEditDocument(Node)boolean isDocumentMimeSupported(javax.jcr.Node node)
throws javax.jcr.RepositoryException
node - the nodejavax.jcr.RepositoryException - the repository exeptionjavax.jcr.Node getDocumentById(String workspace, String uuid) throws javax.jcr.RepositoryException
workspace - the workspace, can be null, then a default
one will be useduuid - the id of a documentnull if nothing foundjavax.jcr.RepositoryException - the repository exceptionvoid downloadVersion(String key, String userId, String contentUrl)
key - the keyuserId - the userIdcontentUrl - the contentUrlConfig.Editor.User getLastModifier(String key)
key - the keyvoid setLastModifier(String key, String userId)
key - the keyuserId - the userId@Deprecated void removeClient(String key, String userId, String clientId)
key - the keyuserId - the userIdclientId - the clientId@Deprecated void addClient(String key, String userId, String clientId)
key - the keyuserId - the userIdclientId - the clientIdCopyright © 2003–2019 eXo Platform SAS. All rights reserved.