Class WorkflowExternalStateHelper
- java.lang.Object
-
- de.xima.fc.workflow.designer.helper.WorkflowExternalStateHelper
-
public final class WorkflowExternalStateHelper extends Object
Helper methods for creating and modifying theWorkflowExternalState
, which is the FORMCYCLE specific state required by the flowchart on the client. The external state is part of the total state of the flowchart preact app.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description WorkflowExternalStateHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
fullUpdate(WorkflowModelBean modelBean, IWorkflowProvider provider, Locale locale)
Recreates the entire external state.static boolean
sync(WorkflowModelBean modelBean)
Sends the updates external state to the client with the next AJAX update.static void
updateClientCounters(WorkflowModelBean modelBean, IWorkflowProvider provider)
Rereads the availableClientCounter
s.static void
updateClientResources(WorkflowModelBean modelBean, IWorkflowProvider provider)
Rereads the availableClientResource
s.static void
updateCustomView(WorkflowModelBean modelBean)
Recreates theCustomViewSettings
.static void
updateInboxes(WorkflowModelBean modelBean, IWorkflowProvider provider)
Rereads the availableInbox
es.static void
updateProjectResources(WorkflowModelBean modelBean, IWorkflowProvider provider)
Rereads the availableProjectResource
s.static void
updateStates(WorkflowModelBean modelBean, IWorkflowProvider provider, Locale locale)
Rereads the availableWorkflowState
s.static void
updateSubmitButtons(WorkflowModelBean modelBean, IWorkflowProvider provider)
Rereads the available submit buttons.static void
updateTemplatesHtml(WorkflowModelBean modelBean, IWorkflowProvider provider)
static void
updateTemplatesUrl(WorkflowModelBean modelBean, IWorkflowProvider provider)
static void
updateUserGroups(WorkflowModelBean modelBean, IWorkflowProvider provider)
Rereads the availableUserGroup
s.static void
updateUsers(WorkflowModelBean modelBean, IWorkflowProvider provider)
Rereads the availableUser
s.
-
-
-
Method Detail
-
fullUpdate
public static void fullUpdate(WorkflowModelBean modelBean, IWorkflowProvider provider, Locale locale)
Recreates the entire external state. Usesync(WorkflowModelBean)
to send them to the client with the next AJAX update.- Parameters:
provider
- Provider to query for data.modelBean
- Current model bean with the data.locale
- Locale for which to create the external states, used for the localized name of the system statereceived
.
-
sync
public static boolean sync(WorkflowModelBean modelBean)
Sends the updates external state to the client with the next AJAX update.- Parameters:
modelBean
- Current model bean with the data.- Returns:
- Whether the external state has changed since the latest updated.
-
updateClientResources
public static void updateClientResources(WorkflowModelBean modelBean, IWorkflowProvider provider)
Rereads the availableClientResource
s. Usesync(WorkflowModelBean)
to send them to the client with the next AJAX update.- Parameters:
modelBean
- Model bean with the current workflow server state.provider
- Workflow provider with the context, used for reading the client resources.
-
updateClientCounters
public static void updateClientCounters(WorkflowModelBean modelBean, IWorkflowProvider provider)
Rereads the availableClientCounter
s. Usesync(WorkflowModelBean)
to send them to the client with the next AJAX update.- Parameters:
modelBean
- Model bean with the current workflow server state.provider
- Workflow provider with the context, used for reading the client resources.
-
updateCustomView
public static void updateCustomView(WorkflowModelBean modelBean)
Recreates theCustomViewSettings
. Usesync(WorkflowModelBean)
to send them to the client with the next AJAX update.- Parameters:
modelBean
- Model bean with the current workflow server state.
-
updateInboxes
public static void updateInboxes(WorkflowModelBean modelBean, IWorkflowProvider provider)
Rereads the availableInbox
es. Usesync(WorkflowModelBean)
to send them to the client with the next AJAX update.- Parameters:
modelBean
- Model bean with the current workflow server state.provider
- Workflow provider with the context, used for reading the inboxes.
-
updateProjectResources
public static void updateProjectResources(WorkflowModelBean modelBean, IWorkflowProvider provider)
Rereads the availableProjectResource
s. Usesync(WorkflowModelBean)
to send them to the client with the next AJAX update.- Parameters:
modelBean
- Model bean with the current workflow server state.provider
- Workflow provider with the context, used for reading the project resources.
-
updateStates
public static void updateStates(WorkflowModelBean modelBean, IWorkflowProvider provider, Locale locale)
Rereads the availableWorkflowState
s. Usesync(WorkflowModelBean)
to send them to the client with the next AJAX update.- Parameters:
modelBean
- Model bean with the current workflow server state.provider
- Workflow provider with the context, used for reading the workflow states.locale
- Locale for localizing the name and description of the states.
-
updateSubmitButtons
public static void updateSubmitButtons(WorkflowModelBean modelBean, IWorkflowProvider provider)
Rereads the available submit buttons. Usesync(WorkflowModelBean)
to send them to the client with the next AJAX update.- Parameters:
modelBean
- Model bean with the current workflow server state.provider
- Workflow provider with the context, used for reading the submit buttons.
-
updateTemplatesHtml
public static void updateTemplatesHtml(WorkflowModelBean modelBean, IWorkflowProvider provider)
Rereads the availableTemplate
s oftype
ETextbausteinKategorie.HTML
. Usesync(WorkflowModelBean)
to send them to the client with the next AJAX update.- Parameters:
modelBean
- Model bean with the current workflow server state.provider
- Workflow provider with the context, used for reading the HTML templates.
-
updateTemplatesUrl
public static void updateTemplatesUrl(WorkflowModelBean modelBean, IWorkflowProvider provider)
Rereads the availableTemplate
s oftype
ETextbausteinKategorie.HTML
. Usesync(WorkflowModelBean)
to send them to the client with the next AJAX update.- Parameters:
modelBean
- Model bean with the current workflow server state.provider
- Workflow provider with the context, used for reading the URL templates.
-
updateUserGroups
public static void updateUserGroups(WorkflowModelBean modelBean, IWorkflowProvider provider)
Rereads the availableUserGroup
s. Usesync(WorkflowModelBean)
to send them to the client with the next AJAX update.- Parameters:
modelBean
- Model bean with the current workflow server state.provider
- Workflow provider with the context, used for reading the user groups.
-
updateUsers
public static void updateUsers(WorkflowModelBean modelBean, IWorkflowProvider provider)
Rereads the availableUser
s. Usesync(WorkflowModelBean)
to send them to the client with the next AJAX update.- Parameters:
modelBean
- Model bean with the current workflow server state.provider
- Workflow provider with the context, used for reading the users.
-
-