Class WorkflowValidationParams.Builder
- java.lang.Object
-
- de.xima.fc.workflow.processor.model.WorkflowValidationParams.Builder
-
- All Implemented Interfaces:
org.apache.commons.lang3.builder.Builder<WorkflowValidationParams>
- Enclosing class:
- WorkflowValidationParams
public static class WorkflowValidationParams.Builder extends Object implements org.apache.commons.lang3.builder.Builder<WorkflowValidationParams>
A builder for configuring the workflow validation context.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description Builder(Projekt project, WorkflowVersion workflowVersion, Mandant client, Benutzer user, Locale locale, IEntityContext ec, boolean ownsEntityContext, WorkflowResourceBundleLocator.MutableWorkflowResourceBundleLocator locator)
Creates a new builder with the given values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WorkflowValidationParams
build()
WorkflowValidationParams.Builder
withBeanValidator(WorkflowBeanValidator beanValidator)
Sets the bean validator required forEWorkflowValidationGroup.ELEMENT_PROPERTIES
WorkflowValidationParams.Builder
withElementIndex(WorkflowElementIndex elementIndex)
Sets the bean validator required forEWorkflowValidationGroup.ELEMENT_PROPERTIES
WorkflowValidationParams.Builder
withFlowAnalysis(WorkflowFlowAnalysis flowAnalysis)
Sets the flow analysis required forEWorkflowValidationGroup.ELEMENT_PROPERTIES
andEWorkflowValidationGroup.CONTROL_FLOW
void
withGroups(Set<EWorkflowValidationGroup> groups)
void
withProvider(IWorkflowProvider provider)
-
-
-
Constructor Detail
-
Builder
public Builder(Projekt project, WorkflowVersion workflowVersion, Mandant client, Benutzer user, Locale locale, IEntityContext ec, boolean ownsEntityContext, WorkflowResourceBundleLocator.MutableWorkflowResourceBundleLocator locator)
Creates a new builder with the given values.- Parameters:
project
- The project that contains the workflow to be validated.workflowVersion
- The workflow version that is to be validated.client
- The client that owns the given project.user
- The current user who requested the validation.locale
- The locale to use for generating validation error messages.ec
- The entity context for interacting with the database. It is passed on to the individual node and trigger handlers.ownsEntityContext
- Whether the validation context should assume ownership of the given entity context. Iftrue
, the entity context will be closed once the workflow context is closed.locator
- Resource bundle locator to use for generating validation error messages.
-
-
Method Detail
-
build
public WorkflowValidationParams build()
- Specified by:
build
in interfaceorg.apache.commons.lang3.builder.Builder<WorkflowValidationParams>
- Returns:
- The validation context for performing the requested workflow validation.
-
withBeanValidator
public WorkflowValidationParams.Builder withBeanValidator(WorkflowBeanValidator beanValidator)
Sets the bean validator required forEWorkflowValidationGroup.ELEMENT_PROPERTIES
- Parameters:
beanValidator
- Bean validator to use.- Returns:
- this for chaining.
-
withElementIndex
public WorkflowValidationParams.Builder withElementIndex(WorkflowElementIndex elementIndex)
Sets the bean validator required forEWorkflowValidationGroup.ELEMENT_PROPERTIES
- Parameters:
elementIndex
- Element index to use.- Returns:
- this for chaining.
-
withFlowAnalysis
public WorkflowValidationParams.Builder withFlowAnalysis(WorkflowFlowAnalysis flowAnalysis)
Sets the flow analysis required forEWorkflowValidationGroup.ELEMENT_PROPERTIES
andEWorkflowValidationGroup.CONTROL_FLOW
- Parameters:
flowAnalysis
- Analysis to use.- Returns:
- this for chaining.
-
withGroups
public void withGroups(Set<EWorkflowValidationGroup> groups)
-
withProvider
public void withProvider(IWorkflowProvider provider)
-
-