Class OnlyOfficeManager
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.workspaces.documents.onlyoffice.OnlyOfficeManager
-
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
public class OnlyOfficeManager extends AbstractLogEnabled implements Component, Serviceable
Main helper for OnlyOffice
-
-
Field Summary
Fields Modifier and Type Field Description private CurrentUserProvider
_currentUserProvider
private AuthenticationTokenManager
_tokenManager
static String
ROLE
The Avalon role
-
Constructor Summary
Constructors Constructor Description OnlyOfficeManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
generateNewToken(String fileId)
Generate a token for OnlyOffice usevoid
service(ServiceManager manager)
Map<String,Object>
signConfiguration(String toSign)
Sign a json configuration for OnlyOffice using a secret parametrized key-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_tokenManager
private AuthenticationTokenManager _tokenManager
-
_currentUserProvider
private CurrentUserProvider _currentUserProvider
-
-
Constructor Detail
-
OnlyOfficeManager
public OnlyOfficeManager()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
generateNewToken
public Map<String,Object> generateNewToken(String fileId)
Generate a token for OnlyOffice use- Parameters:
fileId
- id of the resource that will be used by OnlyOffice- Returns:
- a map containing tokenReponse : the token to use
-
signConfiguration
public Map<String,Object> signConfiguration(String toSign)
Sign a json configuration for OnlyOffice using a secret parametrized key- Parameters:
toSign
- The json to sign- Returns:
- The signed json
-
-