Class OnlyOfficeKeyManager

java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workspaces.documents.onlyoffice.OnlyOfficeKeyManager
All Implemented Interfaces:
LogEnabled, Initializable, Component

Manager for key/token used in OnlyOffice
  • Field Details

    • ROLE

      public static final String ROLE
      The Avalon role
  • Constructor Details

  • Method Details

    • initialize

      public void initialize() throws Exception
      Specified by:
      initialize in interface Initializable
      Throws:
      Exception
    • getKey

      public String getKey(String resourceId)
      Get the OnlyOffice key associated with the resource If a key exist for the resourceId, return it and increment _nbHolders If no key exist for the resourceId, create a new key, put at 1 the _nbHolders and return the key
      Parameters:
      resourceId - id of the resource to look
      Returns:
      the OnlyOffice key
    • createKey

      protected String createKey(String tokenKey)
      Create the OnlyOffice key
      Parameters:
      tokenKey - id of the resource associate to the key
      Returns:
      the new key
    • removeKey

      public void removeKey(String resourceId)
      Remove OnlyOffice key
      Parameters:
      resourceId - id of the resource