Class PlanItemInstanceEntityBuilderImpl
java.lang.Object
org.flowable.cmmn.engine.impl.persistence.entity.PlanItemInstanceEntityBuilderImpl
- All Implemented Interfaces:
PlanItemInstanceEntityBuilder
public class PlanItemInstanceEntityBuilderImpl
extends Object
implements PlanItemInstanceEntityBuilder
Implements the plan item instance builder API.
- Author:
- Micha Kiener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected String
protected String
protected String
protected String
protected PlanItem
protected final PlanItemInstanceEntityManagerImpl
protected boolean
protected PlanItemInstance
protected String
-
Constructor Summary
ConstructorsConstructorDescriptionPlanItemInstanceEntityBuilderImpl
(PlanItemInstanceEntityManagerImpl planItemInstanceEntityManager) -
Method Summary
Modifier and TypeMethodDescriptionaddToParent
(boolean addToParent) Set true, if the new plan item instance to be created should be added to its parent, false otherwise.caseDefinitionId
(String caseDefinitionId) Set the id of the case definition this plan item instance is part of.caseInstanceId
(String caseInstanceId) Set the id of the case instance the plan item instance is a direct or indirect child of.create()
Checks for all necessary values to be present within the builder, creates a new plan item instance and returns it.derivedCaseDefinitionId
(String derivedCaseDefinitionId) If this plan item is derived from another case definition than it is used in, set the case definition it is taken from using this method.getName()
boolean
boolean
boolean
localVariables
(Map<String, Object> localVariables) Optionally add any variables to be set on the new plan item instance as local variables.Optionally override the name for this plan item instance and don't create it based on its plan item model.Set the plan item for the new instance to be based on.silentNameExpressionEvaluation
(boolean silentNameExpressionEvaluation) Invoke this method to suppress any exceptions thrown when evaluating the plan item name expression.stagePlanItemInstance
(PlanItemInstance stagePlanItemInstance) Set the id of the stage plan item instance the new plan item instance is a direct child of.Set the id of the tenant for the new plan item instance.protected void
-
Field Details
-
planItemInstanceEntityManager
-
planItem
-
name
-
caseDefinitionId
-
derivedCaseDefinitionId
-
caseInstanceId
-
stagePlanItemInstance
-
tenantId
-
localVariables
-
addToParent
protected boolean addToParent -
silentNameExpressionEvaluation
protected boolean silentNameExpressionEvaluation
-
-
Constructor Details
-
PlanItemInstanceEntityBuilderImpl
public PlanItemInstanceEntityBuilderImpl(PlanItemInstanceEntityManagerImpl planItemInstanceEntityManager)
-
-
Method Details
-
planItem
Description copied from interface:PlanItemInstanceEntityBuilder
Set the plan item for the new instance to be based on. This is a mandatory information to be set.- Specified by:
planItem
in interfacePlanItemInstanceEntityBuilder
- Parameters:
planItem
- the plan item to base the new instance on- Returns:
- the builder instance for method chaining
-
name
Description copied from interface:PlanItemInstanceEntityBuilder
Optionally override the name for this plan item instance and don't create it based on its plan item model. If set, it has priority over the default given by its plan item model.- Specified by:
name
in interfacePlanItemInstanceEntityBuilder
- Parameters:
name
- the optional name to be used (overridden) for this plan item instance- Returns:
- the builder instance for method chaining
-
caseDefinitionId
Description copied from interface:PlanItemInstanceEntityBuilder
Set the id of the case definition this plan item instance is part of. This is a mandatory information to be set.- Specified by:
caseDefinitionId
in interfacePlanItemInstanceEntityBuilder
- Parameters:
caseDefinitionId
- the id of the case definition the plan item is a part of- Returns:
- the builder instance for method chaining
-
derivedCaseDefinitionId
Description copied from interface:PlanItemInstanceEntityBuilder
If this plan item is derived from another case definition than it is used in, set the case definition it is taken from using this method.- Specified by:
derivedCaseDefinitionId
in interfacePlanItemInstanceEntityBuilder
- Parameters:
derivedCaseDefinitionId
- the case definition id from which this plan item is derived from- Returns:
- the builder instance for method chaining
-
caseInstanceId
Description copied from interface:PlanItemInstanceEntityBuilder
Set the id of the case instance the plan item instance is a direct or indirect child of. This is a mandatory information to be set.- Specified by:
caseInstanceId
in interfacePlanItemInstanceEntityBuilder
- Parameters:
caseInstanceId
- the id of the case instance the new plan item instance is a part of- Returns:
- the builder instance for method chaining
-
stagePlanItemInstance
Description copied from interface:PlanItemInstanceEntityBuilder
Set the id of the stage plan item instance the new plan item instance is a direct child of.- Specified by:
stagePlanItemInstance
in interfacePlanItemInstanceEntityBuilder
- Parameters:
stagePlanItemInstance
- the parent stage instance for the new plan item instance- Returns:
- the builder instance for method chaining
-
tenantId
Description copied from interface:PlanItemInstanceEntityBuilder
Set the id of the tenant for the new plan item instance.- Specified by:
tenantId
in interfacePlanItemInstanceEntityBuilder
- Parameters:
tenantId
- the id of the tenant the new plan item instance belongs to- Returns:
- the builder instance for method chaining
-
localVariables
Description copied from interface:PlanItemInstanceEntityBuilder
Optionally add any variables to be set on the new plan item instance as local variables.- Specified by:
localVariables
in interfacePlanItemInstanceEntityBuilder
- Parameters:
localVariables
- an optional map of variables to set as local values for the new plan item instance- Returns:
- the builder instance for method chaining
-
addToParent
Description copied from interface:PlanItemInstanceEntityBuilder
Set true, if the new plan item instance to be created should be added to its parent, false otherwise.- Specified by:
addToParent
in interfacePlanItemInstanceEntityBuilder
- Parameters:
addToParent
- true, if the plan item instance should be added to its parent- Returns:
- the builder instance for method chaining
-
silentNameExpressionEvaluation
public PlanItemInstanceEntityBuilder silentNameExpressionEvaluation(boolean silentNameExpressionEvaluation) Description copied from interface:PlanItemInstanceEntityBuilder
Invoke this method to suppress any exceptions thrown when evaluating the plan item name expression. This might be necessary, if not all of the necessary values are already available when creating the plan item instance and evaluating its name expression. By default, this is NOT set and an exception while evaluating the name expression will lead into an exception.- Specified by:
silentNameExpressionEvaluation
in interfacePlanItemInstanceEntityBuilder
- Parameters:
silentNameExpressionEvaluation
- true, if the name expression evaluation should ignore any exception thrown- Returns:
- the builder instance for method chaining
-
create
Description copied from interface:PlanItemInstanceEntityBuilder
Checks for all necessary values to be present within the builder, creates a new plan item instance and returns it.- Specified by:
create
in interfacePlanItemInstanceEntityBuilder
- Returns:
- the newly created plan item instance
-
getPlanItem
-
getName
-
getCaseDefinitionId
-
getDerivedCaseDefinitionId
-
getCaseInstanceId
-
getStagePlanItemInstance
-
getTenantId
-
getLocalVariables
-
hasLocalVariables
public boolean hasLocalVariables() -
isAddToParent
public boolean isAddToParent() -
isSilentNameExpressionEvaluation
public boolean isSilentNameExpressionEvaluation() -
validateData
protected void validateData()
-