Package org.exoplatform.onlyoffice.webui
Class OnlyofficeContext
java.lang.Object
org.exoplatform.onlyoffice.webui.OnlyofficeContext
Created by The eXo Platform SAS.
- Version:
- $Id: OnlyofficeClientContext.java 00000 Mar 18, 2019 pnedonosko $
- Author:
- Peter Nedonosko
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringThe Constant CLIENT_RESOURCE_PREFIX.static final StringThe Constant DOCUMENT_PATH_ATTRIBUTE.static final StringThe Constant DOCUMENT_WORKSPACE_ATTRIBUTE.protected static final StringThe Constant JAVASCRIPT.protected static final org.exoplatform.services.log.LogThe Constant LOG.static final StringThe Constant USERID_ATTRIBUTE. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.RequireJSReturn Web UI app's RequireJS instance.static voidShow error message to an user.
-
Field Details
-
USERID_ATTRIBUTE
The Constant USERID_ATTRIBUTE.- See Also:
-
DOCUMENT_WORKSPACE_ATTRIBUTE
The Constant DOCUMENT_WORKSPACE_ATTRIBUTE.- See Also:
-
DOCUMENT_PATH_ATTRIBUTE
The Constant DOCUMENT_PATH_ATTRIBUTE.- See Also:
-
JAVASCRIPT
The Constant JAVASCRIPT. -
CLIENT_RESOURCE_PREFIX
The Constant CLIENT_RESOURCE_PREFIX.- See Also:
-
LOG
protected static final org.exoplatform.services.log.Log LOGThe Constant LOG.
-
-
Method Details
-
init
Inits the context (current user, CometD settings, etc). on Platform app request start.- Throws:
Exception- the exception
-
callModule
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
Return Web UI app's RequireJS instance.- Returns:
- the require JS
- Throws:
Exception- the exception
-
showError
Show error message to an user.- Parameters:
title- the titlemessage- the message
-