public interface OnlyofficeEditorService
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(OnlyofficeEditorListener listener)
Add listener to the service.
|
boolean |
canDownloadBy(String hostName)
Check does given host can download document content by this service.
|
Config |
createEditor(String userSchema,
String userHost,
String userId,
String workspace,
String docId)
Create an editor configuration for given user and node.
|
DocumentContent |
getContent(String userId,
String fileKey)
Get file content.
|
javax.jcr.Node |
getDocument(String workspace,
String id)
Gets the document node by its ID and optionally a repository workspace.
|
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(String schema,
String host,
String workspace,
String docId)
Gets the editor page URL for opening at Platform server.
|
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.
|
void |
removeListener(OnlyofficeEditorListener listener)
Remove listener from the service.
|
void |
updateDocument(String userId,
DocumentStatus status)
Update a configuration associated with given editor
Config
instance. |
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, String userId, String workspace, String docId) throws OnlyofficeEditorException, javax.jcr.RepositoryException
userSchema - the schemauserHost - the hostuserId - 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(String schema, String host, String workspace, String docId)
schema - the schemahost - the hostworkspace - the workspacedocId - the doc IDjavax.jcr.Node getDocument(String workspace, String id) throws javax.jcr.RepositoryException
workspace - the workspace, can be null, then a default
one will be usedid - the ID of a documentnull if nothing foundjavax.jcr.RepositoryException - the repository exceptionDocumentContent 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 listenerCopyright © 2003–2019 eXo Platform SAS. All rights reserved.