Package org.exoplatform.onlyoffice.webui
Class OnlyofficeContext
- java.lang.Object
-
- org.exoplatform.onlyoffice.webui.OnlyofficeContext
-
public class OnlyofficeContext extends Object
Created by The eXo Platform SAS.- Version:
- $Id: OnlyofficeClientContext.java 00000 Mar 18, 2019 pnedonosko $
- Author:
- Peter Nedonosko
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringCLIENT_RESOURCE_PREFIXThe Constant CLIENT_RESOURCE_PREFIX.static StringDOCUMENT_PATH_ATTRIBUTEThe Constant DOCUMENT_PATH_ATTRIBUTE.static StringDOCUMENT_WORKSPACE_ATTRIBUTEThe Constant DOCUMENT_WORKSPACE_ATTRIBUTE.protected static StringJAVASCRIPTThe Constant JAVASCRIPT.protected static org.exoplatform.services.log.LogLOGThe Constant LOG.static StringUSERID_ATTRIBUTEThe Constant USERID_ATTRIBUTE.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcallModule(String code)Adds the script to be called ononlyofficemodule.static voidinit()Inits the context (current user, CometD settings, etc).static org.exoplatform.web.application.RequireJSrequireJS()Return Web UI app's RequireJS instance.static voidshowError(String title, String message)Show error message to an user.
-
-
-
Field Detail
-
USERID_ATTRIBUTE
public static final String USERID_ATTRIBUTE
The Constant USERID_ATTRIBUTE.- See Also:
- Constant Field Values
-
DOCUMENT_WORKSPACE_ATTRIBUTE
public static final String DOCUMENT_WORKSPACE_ATTRIBUTE
The Constant DOCUMENT_WORKSPACE_ATTRIBUTE.- See Also:
- Constant Field Values
-
DOCUMENT_PATH_ATTRIBUTE
public static final String DOCUMENT_PATH_ATTRIBUTE
The Constant DOCUMENT_PATH_ATTRIBUTE.- See Also:
- Constant Field Values
-
JAVASCRIPT
protected static final String JAVASCRIPT
The Constant JAVASCRIPT.
-
CLIENT_RESOURCE_PREFIX
protected static final String CLIENT_RESOURCE_PREFIX
The Constant CLIENT_RESOURCE_PREFIX.- See Also:
- Constant Field Values
-
LOG
protected static final org.exoplatform.services.log.Log LOG
The Constant LOG.
-
-
Method Detail
-
init
public static void init() throws ExceptionInits the context (current user, CometD settings, etc). on Platform app request start.- Throws:
Exception- the exception
-
callModule
public static void callModule(String code) throws Exception
Adds the script to be called ononlyofficemodule. Finally it will appear asonlyoffice.myMethod(...), where myMethod(...) it's what given as code parameter.- Parameters:
code- the code of a method to invoke on onlyoffice module- Throws:
Exception- the exception
-
requireJS
public static org.exoplatform.web.application.RequireJS requireJS() throws ExceptionReturn Web UI app's RequireJS instance.- Returns:
- the require JS
- Throws:
Exception- the exception
-
-