@Named @ConversationScoped public class WopiController extends Object implements Serializable
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.
| Modifier and Type | Field and Description |
|---|---|
static String |
ITEM_WOPI_AUTO_OPEN |
static String |
WOPI_CONFIRM_CHANGES |
| Constructor and Description |
|---|
WopiController() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearAccessToken()
Clears an existing access token.
|
String |
getAccessToken() |
String |
getConfirmMessage()
This helper method returns the confirm message string used in case the
LibreOffice Online Editor is closed, but contains changes .
|
String |
getWopiAccessURL(String uniqueid,
String file,
String userid,
String username)
Returns the access url for the wopi client.
|
boolean |
isEnabled()
Indicates if the wopi feature is enabled
|
void |
onWorkflowEvent(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.
|
public static final String ITEM_WOPI_AUTO_OPEN
public static final String WOPI_CONFIRM_CHANGES
public boolean isEnabled()
public String getAccessToken()
public void clearAccessToken()
public String getWopiAccessURL(String uniqueid, String file, String userid, String username)
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}
public void onWorkflowEvent(@Observes
org.imixs.workflow.faces.data.WorkflowEvent workflowEvent)
To access the filedata object, the controller uses the access token
public String getConfirmMessage()
Copyright © 2021 Imixs Software Solutions GmbH. All rights reserved.