Class Dependency

All Implemented Interfaces:
ConfigurationItem, CiWithInternalMetadata, Serializable, Comparable<BaseConfigurationItem>

@Metadata(description="A dependency to another release, phase or task in a Gate task.", versioned=false) public class Dependency extends BaseConfigurationItem implements CiWithInternalMetadata
Dependency is a link from a gate task to a plan item (release, phase or task) on which the gate depends.

There are several possible states of a dependency:

  • Variable dependency. In this case the targetId contains a variable expression like ${varPhaseId}, and target is null.
  • Dependency with string target. In this case the targetId contains a plan item ID, and target is null.
    • It is possible that targetId was emptied by a public API call or by deleting a variable. Then such a dependency does not contain neither target nor targetId and will cause a Gate to fail.
  • Normal dependency. In this case the target field points to the plan item on which the gateTask depends.
  • Archived dependency. A dependency becomes "archived" when the target plan item was deleted, for example when archiving old completed releases. In this case the target is null, and the information about archived plan item is stored in fields archivedTargetId, archivedTargetTitle and archivedAsResolved. The latter shows if the plan item was COMPLETED or ABORTED.
See Also:
  • Field Details

  • Constructor Details

    • Dependency

      public Dependency()
  • Method Details

    • getGateTask

      public GateTask getGateTask()
    • setGateTask

      public void setGateTask(GateTask gateTask)
    • getTarget

      public <T extends PlanItem> T getTarget()
    • setTarget

      public void setTarget(PlanItem target)
    • getTargetId

      public String getTargetId()
    • setTargetId

      public void setTargetId(String targetId)
    • getArchivedTargetId

      public String getArchivedTargetId()
    • getArchivedTargetTitle

      public String getArchivedTargetTitle()
    • isArchived

      public boolean isArchived()
    • isDone

      public boolean isDone()
    • isAborted

      public boolean isAborted()
    • getTargetDisplayPath

      public String getTargetDisplayPath()
    • getTargetTitle

      public String getTargetTitle()
    • archive

      public void archive()
    • isArchivedAsResolved

      public boolean isArchivedAsResolved()
    • createArchivedTargetTitle

      public static String createArchivedTargetTitle(PlanItem planItem)
    • hasResolvedTarget

      public boolean hasResolvedTarget()
    • hasVariableTarget

      public boolean hasVariableTarget()
    • hasValidArchiveTargetId

      public boolean hasValidArchiveTargetId()
    • get$metadata

      public Map<String,InternalMetadata> get$metadata()
      Specified by:
      get$metadata in interface CiWithInternalMetadata