public class OnlyofficeContext extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
CLIENT_RESOURCE_PREFIX
The Constant CLIENT_RESOURCE_PREFIX.
|
static String |
DOCUMENT_PATH_ATTRIBUTE
The Constant DOCUMENT_PATH_ATTRIBUTE.
|
static String |
DOCUMENT_WORKSPACE_ATTRIBUTE
The Constant DOCUMENT_WORKSPACE_ATTRIBUTE.
|
protected static String |
JAVASCRIPT
The Constant JAVASCRIPT.
|
protected static org.exoplatform.services.log.Log |
LOG
The Constant LOG.
|
static String |
USERID_ATTRIBUTE
The Constant USERID_ATTRIBUTE.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
callModule(String code)
Adds the script to be called on
onlyoffice module. |
static String |
editorLink(String link,
String source)
Generate Editor link with context information: source app (e.g.
|
static void |
init()
Inits the context (current user, CometD settings, etc).
|
static org.exoplatform.web.application.RequireJS |
requireJS()
Return Web UI app's RequireJS instance.
|
static void |
showError(String title,
String message)
Show error message to an user.
|
public static final String USERID_ATTRIBUTE
public static final String DOCUMENT_WORKSPACE_ATTRIBUTE
public static final String DOCUMENT_PATH_ATTRIBUTE
protected static final String JAVASCRIPT
protected static final String CLIENT_RESOURCE_PREFIX
protected static final org.exoplatform.services.log.Log LOG
public static void init()
throws Exception
Exception - the exceptionpublic static void callModule(String code) throws Exception
onlyoffice module. Finally it
will appear as onlyoffice.myMethod(...), where myMethod(...)
it's what given as code parameter.code - the code of a method to invoke on onlyoffice moduleException - the exceptionpublic static org.exoplatform.web.application.RequireJS requireJS()
throws Exception
Exception - the exceptionpublic static void showError(String title, String message)
title - the titlemessage - the messagepublic static String editorLink(String link, String source)
link - the link obtained from
OnlyofficeEditorService.getEditorLink(javax.jcr.Node)source - the source name, can be any text valueCopyright © 2003–2019 eXo Platform SAS. All rights reserved.