Class OnlyOfficeManager
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workspaces.documents.onlyoffice.OnlyOfficeManager
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
Main helper for OnlyOffice edition
-
Field Summary
Modifier and TypeFieldDescriptionprotected CurrentUserProvider
The current user providerprotected OnlyOfficeKeyManager
The Only Office key managerprotected AmetysObjectResolver
The Ametys object resolverprotected AuthenticationTokenManager
The token managerstatic final String
The Avalon role -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongenerateToken
(String fileId) Generate a token for OnlyOffice usegetOnlyOfficeInfo
(String resourceId) Get the needed information for Only Office editionboolean
Determines if OnlyOffice edition is availablevoid
service
(ServiceManager manager) signConfiguration
(String toSign) Sign a json configuration for OnlyOffice using a secret parametrized keyMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The Avalon role -
_tokenManager
The token manager -
_currentUserProvider
The current user provider -
_resolver
The Ametys object resolver -
_onlyOfficeKeyManager
The Only Office key manager
-
-
Constructor Details
-
OnlyOfficeManager
public OnlyOfficeManager()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
isOnlyOfficeEditionAvailable
Determines if OnlyOffice edition is available- Returns:
- true if OnlyOffice edition is available
-
getOnlyOfficeInfo
Get the needed information for Only Office edition- Parameters:
resourceId
- the id of resource to edit- Returns:
- the only office informations
-
generateToken
Generate a token for OnlyOffice use- Parameters:
fileId
- id of the resource that will be used by OnlyOffice- Returns:
- the token
-
signConfiguration
Sign a json configuration for OnlyOffice using a secret parametrized key- Parameters:
toSign
- The json to sign- Returns:
- The signed json
-