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 Details

    • USERID_ATTRIBUTE

      public static final String USERID_ATTRIBUTE
      The Constant USERID_ATTRIBUTE.
      See Also:
    • DOCUMENT_WORKSPACE_ATTRIBUTE

      public static final String DOCUMENT_WORKSPACE_ATTRIBUTE
      The Constant DOCUMENT_WORKSPACE_ATTRIBUTE.
      See Also:
    • DOCUMENT_PATH_ATTRIBUTE

      public static final String DOCUMENT_PATH_ATTRIBUTE
      The Constant DOCUMENT_PATH_ATTRIBUTE.
      See Also:
    • 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:
    • LOG

      protected static final org.exoplatform.services.log.Log LOG
      The Constant LOG.
  • Method Details

    • init

      public static void init() throws Exception
      Inits 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 on onlyoffice module. Finally it will appear as onlyoffice.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 Exception
      Return Web UI app's RequireJS instance.
      Returns:
      the require JS
      Throws:
      Exception - the exception
    • showError

      public static void showError(String title, String message)
      Show error message to an user.
      Parameters:
      title - the title
      message - the message