public class EditorService extends Object implements org.exoplatform.services.rest.resource.ResourceContainer
| Modifier and Type | Field and Description |
|---|---|
static String |
API_VERSION
The Constant API_VERSION.
|
protected OnlyofficeEditorService |
editors
The editors.
|
protected Map<UUID,Config> |
initiated
The initiated.
|
protected static org.exoplatform.services.log.Log |
LOG
The Constant LOG.
|
| Constructor and Description |
|---|
EditorService(OnlyofficeEditorService editors)
REST cloudDrives uses
OnlyofficeEditorService for actual job. |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
configPost(javax.ws.rs.core.UriInfo uriInfo,
javax.servlet.http.HttpServletRequest request,
String workspace,
String path)
Create configuration for Onlyoffice JS.
|
javax.ws.rs.core.Response |
content(javax.ws.rs.core.UriInfo uriInfo,
javax.servlet.http.HttpServletRequest request,
String userId,
String key)
Document content download link.
|
protected String |
getClientHost(javax.servlet.http.HttpServletRequest request)
Gets the client host.
|
protected String |
getClientIpAddr(javax.servlet.http.HttpServletRequest request)
Gets the client ip addr.
|
javax.ws.rs.core.Response |
getVersions(javax.ws.rs.core.UriInfo uriInfo,
javax.servlet.http.HttpServletRequest request,
String workspace,
String key)
Getting versions of the given document
|
protected boolean |
isValidHost(String host)
Checks if is valid host.
|
javax.ws.rs.core.Response |
localState(javax.ws.rs.core.UriInfo uriInfo,
String userId,
String key)
Editing document state in local storage.
|
protected boolean |
notEmpty(String str)
Check string is not empty.
|
javax.ws.rs.core.Response |
status(javax.ws.rs.core.UriInfo uriInfo,
javax.servlet.http.HttpServletRequest request,
String userId,
String key,
String statusText)
Config status posted from the Document Server.
|
javax.ws.rs.core.Response |
versionGet(javax.ws.rs.core.UriInfo uriInfo,
javax.servlet.http.HttpServletRequest request)
Return Onlyoffice REST API version.
|
public static final String API_VERSION
protected static final org.exoplatform.services.log.Log LOG
protected final OnlyofficeEditorService editors
public EditorService(OnlyofficeEditorService editors)
OnlyofficeEditorService for actual job.editors - the editorspublic javax.ws.rs.core.Response status(@Context
javax.ws.rs.core.UriInfo uriInfo,
@Context
javax.servlet.http.HttpServletRequest request,
String userId,
String key,
String statusText)
uriInfo - - request inforequest - the requestuserId - the user idkey - - config key generated when requested editor configstatusText - the status textResponsepublic javax.ws.rs.core.Response content(@Context
javax.ws.rs.core.UriInfo uriInfo,
@Context
javax.servlet.http.HttpServletRequest request,
String userId,
String key)
uriInfo - - request inforequest - the requestuserId - the user idkey - - file key generated by /config methodResponse@RolesAllowed(value="users") public javax.ws.rs.core.Response configPost(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.servlet.http.HttpServletRequest request, String workspace, String path)
uriInfo - - request with base URIrequest - the requestworkspace - the workspacepath - the pathpublic javax.ws.rs.core.Response versionGet(@Context
javax.ws.rs.core.UriInfo uriInfo,
@Context
javax.servlet.http.HttpServletRequest request)
uriInfo - - request with base URIrequest - the request@RolesAllowed(value="users") public javax.ws.rs.core.Response localState(@Context javax.ws.rs.core.UriInfo uriInfo, String userId, String key)
uriInfo - - request infouserId - the user idkey - - config key generated when requested editor configResponse@RolesAllowed(value="users") public javax.ws.rs.core.Response getVersions(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.servlet.http.HttpServletRequest request, String workspace, String key)
uriInfo - the request inforequest - the requestworkspace - the document workspacekey - the document keyResponseprotected String getClientIpAddr(javax.servlet.http.HttpServletRequest request)
request - the requestprotected String getClientHost(javax.servlet.http.HttpServletRequest request)
request - the requestprotected boolean notEmpty(String str)
str - the strprotected boolean isValidHost(String host)
null, non
empty string and not "unknown" text.host - the host name or IP addressCopyright © 2003–2020 eXo Platform SAS. All rights reserved.