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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringCreate the OnlyOffice keyGet 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 keyvoidvoidRemove OnlyOffice keyMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The Avalon role
-
-
Constructor Details
-
OnlyOfficeKeyManager
public OnlyOfficeKeyManager()
-
-
Method Details
-
initialize
- Specified by:
initializein interfaceInitializable- Throws:
Exception
-
getKey
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
Create the OnlyOffice key- Parameters:
tokenKey- id of the resource associate to the key- Returns:
- the new key
-
removeKey
Remove OnlyOffice key- Parameters:
resourceId- id of the resource
-