Package org.imixs.workflow.wopi
Class WopiController
java.lang.Object
org.imixs.workflow.wopi.WopiController
- All Implemented Interfaces:
Serializable
The WopiController is a front end controller providing the access endpoint
for a file.
The controller expects the environment variable 'WOPI_HOST_ENDPOINT' with the internal URL the WopiClient can contact the WopiHostService
The controller also listens on the WorklfowEvent to update modified file content into the workItem before processing.
- Author:
- rsoika
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears an existing access token.This helper method returns the confirm message string used in case the LibreOffice Online Editor is closed, but contains changes .getWopiAccessURL(String uniqueid, String file, String userid, String username) Returns the access url for the wopi client.booleanIndicates if the wopi feature is enabledvoidonWorkflowEvent(org.imixs.workflow.faces.data.WorkflowEvent workflowEvent) This method transfers all cached file updates form the local wopi file cache into the current workitem, before the workitem is processed.
-
Field Details
-
ITEM_WOPI_AUTO_OPEN
- See Also:
-
WOPI_CONFIRM_CHANGES
- See Also:
-
-
Constructor Details
-
WopiController
public WopiController()
-
-
Method Details
-
isEnabled
public boolean isEnabled()Indicates if the wopi feature is enabled- Returns:
-
getAccessToken
-
clearAccessToken
public void clearAccessToken()Clears an existing access token. -
getWopiAccessURL
Returns the access url for the wopi client.The method creates an accessToken (JWT) including the username. https://localhost:9980/{libreoffice-editor}.html?WOPISrc=http://wopi-app:8080/api/wopi/files/{your-file}
-
onWorkflowEvent
public void onWorkflowEvent(@Observes org.imixs.workflow.faces.data.WorkflowEvent workflowEvent) This method transfers all cached file updates form the local wopi file cache into the current workitem, before the workitem is processed. The method also clears the file cache.To access the filedata object, the controller uses the access token
-
getConfirmMessage
This helper method returns the confirm message string used in case the LibreOffice Online Editor is closed, but contains changes .- Returns:
-