public class Config extends Object implements Externalizable
Externalizable for serialization in eXo cache
(actual in cluster). Created by The eXo Platform SAS.| Modifier and Type | Class and Description |
|---|---|
static class |
Config.Builder
The Class Builder.
|
static class |
Config.Document
The Onlyoffice Document.
|
static class |
Config.Editor
The Onlyoffice Editor.
|
| Modifier and Type | Field and Description |
|---|---|
protected static SimpleDateFormat |
DATETIME_FORMAT
The Constant DATETIME_FORMAT.
|
protected static String |
EMPTY
The Constant EMPTY.
|
protected static String |
NO_LANG
The Constant NO_LANG.
|
| Modifier | Constructor and Description |
|---|---|
|
Config()
Instantiates a new config for use with
Externalizable methods. |
protected |
Config(String documentserverUrl,
String platformRestUrl,
String editorUrl,
URI explorerUri,
String documentType,
String workspace,
String path,
EditorPage editorPage,
Boolean isActivity,
String docId,
Config.Document document,
Config.Editor editor)
Editor config constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected static String |
callbackUrl(CharSequence baseUrl,
String userId,
String key)
Callback url.
|
void |
closed()
Mark this config as closed: the editor closed, if it was last user in the
editor, then its document should be saved in the storage.
|
void |
closing()
Mark this config as closing: user already closed this editor but document
not yet saved in the storage.
|
protected static Config.Builder |
editor(String documentserverUrl,
String documentType,
String workspace,
String path,
String docId)
Editor.
|
boolean |
equals(Object obj) |
protected static String |
fileUrl(CharSequence baseUrl,
String userId,
String key)
File url.
|
Config |
forUser(String id,
String firstName,
String lastName,
String lang,
String documentserverSecret)
Create a copy of this editor but for another given user.
|
Long |
getClosedTime()
Gets the closedTime.
|
String |
getDocId()
Gets the document ID in storage.
|
Config.Document |
getDocument()
Gets the document.
|
String |
getDocumentserverJsUrl()
Gets the documentserver js url.
|
String |
getDocumentserverUrl()
Gets the documentserver url.
|
String |
getDocumentType()
Gets the document type.
|
Config.Editor |
getEditorConfig()
Gets the editor config.
|
EditorPage |
getEditorPage()
Gets the editor page.
|
String |
getEditorUrl()
Gets the editor absolute URL.
|
String |
getError()
Gets the error.
|
URI |
getExplorerUri()
Gets the explorer page URI.
|
String |
getExplorerUrl()
Gets the explorer absolute URL.
|
Long |
getOpenedTime()
Gets the openedTime.
|
String |
getPath()
Gets the path in storage.
|
Calendar |
getPreviousModified() |
Boolean |
getSameModifier() |
String |
getToken()
Gets the token.
|
String |
getWorkspace()
Gets a workspace of the storage.
|
boolean |
hasError()
Checks for error.
|
Boolean |
isActivity()
Is activity
|
boolean |
isClosed()
Checks if is editor closed (including closing state).
|
boolean |
isClosing()
Checks if is editor currently closing (saving the document).
|
boolean |
isCreated()
Checks if is created.
|
boolean |
isOpen()
Checks if is editor open.
|
void |
open()
Mark this config as open: user opened this editor.
|
void |
readExternal(ObjectInput in) |
protected void |
setClosedTime(Long closedTime)
Sets the closedTime.
|
protected void |
setEditorPage(EditorPage editorPage)
Sets the editorPage.
|
protected void |
setError(String error)
Sets the error.
|
protected void |
setOpenedTime(Long openedTime)
Sets the openedTime.
|
void |
setPreviousModified(Calendar previousModified) |
void |
setSameModifier(Boolean samemodifier) |
void |
setToken(String token)
Sets the token.
|
String |
toJSON()
Return this config as JSON string.
|
String |
toString() |
void |
writeExternal(ObjectOutput out) |
protected static final SimpleDateFormat DATETIME_FORMAT
protected static final String NO_LANG
protected static final String EMPTY
public Config()
Externalizable methods. User
by serialization.protected Config(String documentserverUrl, String platformRestUrl, String editorUrl, URI explorerUri, String documentType, String workspace, String path, EditorPage editorPage, Boolean isActivity, String docId, Config.Document document, Config.Editor editor)
documentserverUrl - the documentserver URLplatformRestUrl - the platform urleditorUrl - the editor urlexplorerUri - the explorer uridocumentType - the document typeworkspace - the workspacepath - the patheditorPage - the editor pageisActivity - the isActivitydocId - the document IDdocument - the documenteditor - the editorprotected static Config.Builder editor(String documentserverUrl, String documentType, String workspace, String path, String docId)
documentserverUrl - the documentserver urldocumentType - the document typeworkspace - the workspacepath - the pathdocId - the document IDprotected static String fileUrl(CharSequence baseUrl, String userId, String key)
baseUrl - the platform urluserId - the user idkey - the keyprotected static String callbackUrl(CharSequence baseUrl, String userId, String key)
baseUrl - the platform urluserId - the user idkey - the keypublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic String getDocumentserverJsUrl()
public String getDocumentserverUrl()
public String getToken()
public void setToken(String token)
token - the tokenpublic String getWorkspace()
public String getPath()
public Boolean isActivity()
public EditorPage getEditorPage()
public String getDocId()
public String getEditorUrl()
public String getExplorerUrl()
public URI getExplorerUri()
public String getDocumentType()
public Config.Document getDocument()
public Long getOpenedTime()
public Long getClosedTime()
protected void setOpenedTime(Long openedTime)
openedTime - the openedTimeprotected void setClosedTime(Long closedTime)
closedTime - the closedTimeprotected void setEditorPage(EditorPage editorPage)
editorPage - the editorPagepublic Config.Editor getEditorConfig()
public void setPreviousModified(Calendar previousModified)
public Calendar getPreviousModified()
public void setSameModifier(Boolean samemodifier)
public Boolean getSameModifier()
public Config forUser(String id, String firstName, String lastName, String lang, String documentserverSecret)
public boolean isCreated()
public boolean isOpen()
public boolean isClosed()
public boolean isClosing()
public void open()
public void closing()
public void closed()
protected void setError(String error)
error - the new errorpublic boolean hasError()
public String getError()
public String toJSON() throws org.exoplatform.ws.frameworks.json.impl.JsonException
org.exoplatform.ws.frameworks.json.impl.JsonException - the json exceptionCopyright © 2003–2019 eXo Platform SAS. All rights reserved.