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 Details

    • planItemInstanceEntityManager

      protected final PlanItemInstanceEntityManagerImpl planItemInstanceEntityManager
    • planItem

      protected PlanItem planItem
    • name

      protected String name
    • caseDefinitionId

      protected String caseDefinitionId
    • derivedCaseDefinitionId

      protected String derivedCaseDefinitionId
    • caseInstanceId

      protected String caseInstanceId
    • stagePlanItemInstance

      protected PlanItemInstance stagePlanItemInstance
    • tenantId

      protected String tenantId
    • localVariables

      protected Map<String,Object> localVariables
    • addToParent

      protected boolean addToParent
    • silentNameExpressionEvaluation

      protected boolean silentNameExpressionEvaluation
  • Constructor Details

  • Method Details

    • planItem

      public PlanItemInstanceEntityBuilder planItem(PlanItem 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 interface PlanItemInstanceEntityBuilder
      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 interface PlanItemInstanceEntityBuilder
      Parameters:
      name - the optional name to be used (overridden) for this plan item instance
      Returns:
      the builder instance for method chaining
    • caseDefinitionId

      public PlanItemInstanceEntityBuilder caseDefinitionId(String 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 interface PlanItemInstanceEntityBuilder
      Parameters:
      caseDefinitionId - the id of the case definition the plan item is a part of
      Returns:
      the builder instance for method chaining
    • derivedCaseDefinitionId

      public PlanItemInstanceEntityBuilder derivedCaseDefinitionId(String 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 interface PlanItemInstanceEntityBuilder
      Parameters:
      derivedCaseDefinitionId - the case definition id from which this plan item is derived from
      Returns:
      the builder instance for method chaining
    • caseInstanceId

      public PlanItemInstanceEntityBuilder caseInstanceId(String 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 interface PlanItemInstanceEntityBuilder
      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

      public PlanItemInstanceEntityBuilder stagePlanItemInstance(PlanItemInstance 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 interface PlanItemInstanceEntityBuilder
      Parameters:
      stagePlanItemInstance - the parent stage instance for the new plan item instance
      Returns:
      the builder instance for method chaining
    • tenantId

      public PlanItemInstanceEntityBuilder tenantId(String tenantId)
      Description copied from interface: PlanItemInstanceEntityBuilder
      Set the id of the tenant for the new plan item instance.
      Specified by:
      tenantId in interface PlanItemInstanceEntityBuilder
      Parameters:
      tenantId - the id of the tenant the new plan item instance belongs to
      Returns:
      the builder instance for method chaining
    • localVariables

      public PlanItemInstanceEntityBuilder localVariables(Map<String,Object> 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 interface PlanItemInstanceEntityBuilder
      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

      public PlanItemInstanceEntityBuilder addToParent(boolean 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 interface PlanItemInstanceEntityBuilder
      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 interface PlanItemInstanceEntityBuilder
      Parameters:
      silentNameExpressionEvaluation - true, if the name expression evaluation should ignore any exception thrown
      Returns:
      the builder instance for method chaining
    • create

      public PlanItemInstanceEntity 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 interface PlanItemInstanceEntityBuilder
      Returns:
      the newly created plan item instance
    • getPlanItem

      public PlanItem getPlanItem()
    • getName

      public String getName()
    • getCaseDefinitionId

      public String getCaseDefinitionId()
    • getDerivedCaseDefinitionId

      public String getDerivedCaseDefinitionId()
    • getCaseInstanceId

      public String getCaseInstanceId()
    • getStagePlanItemInstance

      public PlanItemInstance getStagePlanItemInstance()
    • getTenantId

      public String getTenantId()
    • getLocalVariables

      public Map<String,Object> getLocalVariables()
    • hasLocalVariables

      public boolean hasLocalVariables()
    • isAddToParent

      public boolean isAddToParent()
    • isSilentNameExpressionEvaluation

      public boolean isSilentNameExpressionEvaluation()
    • validateData

      protected void validateData()