Interface PlanItemInstanceEntityBuilder

All Known Implementing Classes:
PlanItemInstanceEntityBuilderImpl

public interface PlanItemInstanceEntityBuilder
A plan item instance builder used to create new plan item instances with different options.
Author:
Micha Kiener
  • Method Details

    • planItem

      Set the plan item for the new instance to be based on. This is a mandatory information to be set.
      Parameters:
      planItem - the plan item to base the new instance on
      Returns:
      the builder instance for method chaining
    • name

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

      PlanItemInstanceEntityBuilder caseDefinitionId(String caseDefinitionId)
      Set the id of the case definition this plan item instance is part of. This is a mandatory information to be set.
      Parameters:
      caseDefinitionId - the id of the case definition the plan item is a part of
      Returns:
      the builder instance for method chaining
    • derivedCaseDefinitionId

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

      PlanItemInstanceEntityBuilder caseInstanceId(String caseInstanceId)
      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.
      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

      PlanItemInstanceEntityBuilder stagePlanItemInstance(PlanItemInstance stagePlanItemInstance)
      Set the id of the stage plan item instance the new plan item instance is a direct child of.
      Parameters:
      stagePlanItemInstance - the parent stage instance for the new plan item instance
      Returns:
      the builder instance for method chaining
    • tenantId

      Set the id of the tenant for the new plan item instance.
      Parameters:
      tenantId - the id of the tenant the new plan item instance belongs to
      Returns:
      the builder instance for method chaining
    • localVariables

      PlanItemInstanceEntityBuilder localVariables(Map<String,Object> localVariables)
      Optionally add any variables to be set on the new plan item instance as local variables.
      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

      PlanItemInstanceEntityBuilder addToParent(boolean addToParent)
      Set true, if the new plan item instance to be created should be added to its parent, false otherwise.
      Parameters:
      addToParent - true, if the plan item instance should be added to its parent
      Returns:
      the builder instance for method chaining
    • silentNameExpressionEvaluation

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

      Checks for all necessary values to be present within the builder, creates a new plan item instance and returns it.
      Returns:
      the newly created plan item instance