Class FacesWorkflowLocalValidationContext
- java.lang.Object
-
- de.xima.fc.workflow.designer.logic.FacesWorkflowLocalValidationContext
-
- All Implemented Interfaces:
IBaseEnvironmentData
,IWorkflowValidationEnvironmentData
,IBaseWorkflowEnvironmentData
,IWorkflowLocalBeanValidationContext
,IWorkflowLocalValidationContext
,IWorkflowValidationContext
public class FacesWorkflowLocalValidationContext extends Object implements IWorkflowLocalBeanValidationContext
Context for the workflow validation that is available when bean validation is invoked from JSF. All state is delegated to the HTTP session / JSF view.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description FacesWorkflowLocalValidationContext()
Creates a new, stateless bean workflow validation context.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <T> T
associateValue(Object key, Function<IWorkflowLocalValidationContext,T> supplier)
Associates the given value for the duration of the workflow validation process.Mandant
getClient()
ElementKey
getCurrentElementKey()
IEntityContext
getEntityContext()
Locale
getLocale()
Projekt
getProject()
IWorkflowProvider
getProvider()
Benutzer
getUser()
Deprecated.UsegetUserModel()
instead.IUser
getUserModel()
WorkflowVersion
getWorkflowVersion()
IWorkflowElementValidationResultBuilder
resultBuilder()
-
-
-
Method Detail
-
associateValue
public <T> T associateValue(Object key, Function<IWorkflowLocalValidationContext,T> supplier)
Description copied from interface:IWorkflowLocalValidationContext
Associates the given value for the duration of the workflow validation process. Once validation is done, the values are discarded.- Specified by:
associateValue
in interfaceIWorkflowLocalValidationContext
- Type Parameters:
T
- Type of the associate value.- Parameters:
key
- Key for the association.supplier
- Supplier that produces the value when not yet present.- Returns:
- The associated value.
-
getClient
public Mandant getClient()
- Specified by:
getClient
in interfaceIBaseEnvironmentData
- Returns:
- The
Mandant
of the current context.
-
getCurrentElementKey
public ElementKey getCurrentElementKey()
- Specified by:
getCurrentElementKey
in interfaceIWorkflowLocalBeanValidationContext
- Returns:
- The
ElementKey
of the current workflow node or trigger that is currently being checked in the current workflow process.null
when no such element key exists.
-
getEntityContext
public IEntityContext getEntityContext()
- Specified by:
getEntityContext
in interfaceIBaseEnvironmentData
- Returns:
- The current entity context that may be used for database interactions.
-
getLocale
public Locale getLocale()
- Specified by:
getLocale
in interfaceIBaseEnvironmentData
- Returns:
- The locale to use for locale-sensitive actions.
-
getProject
public Projekt getProject()
- Specified by:
getProject
in interfaceIBaseWorkflowEnvironmentData
- Returns:
- The current project to which the workflow belongs.
-
getProvider
public IWorkflowProvider getProvider()
- Specified by:
getProvider
in interfaceIWorkflowValidationContext
- Returns:
- The provider for accessing various contextual data, such as a list of all users or user groups.
-
getUserModel
public IUser getUserModel()
- Specified by:
getUserModel
in interfaceIBaseEnvironmentData
- Returns:
- The user of the active context that should be used for protocol entries etc.
-
getUser
@Deprecated public Benutzer getUser()
Deprecated.UsegetUserModel()
instead.- Specified by:
getUser
in interfaceIBaseEnvironmentData
- Returns:
- The user of the active context that should be used for protocol entries etc.
-
getWorkflowVersion
public WorkflowVersion getWorkflowVersion()
- Specified by:
getWorkflowVersion
in interfaceIBaseWorkflowEnvironmentData
- Returns:
- The current workflow version that is being validated.
-
resultBuilder
public IWorkflowElementValidationResultBuilder resultBuilder()
- Specified by:
resultBuilder
in interfaceIWorkflowLocalValidationContext
- Returns:
- Builder for creating the result that needs to be returned by
IElementHandler#validateLocal
. This is provided for convenience, you can also create your own implementation ofIWorkflowElementValidationResult
.
-
-