Class Dependency

  • All Implemented Interfaces:
    ConfigurationItem, CiWithInternalMetadata, java.io.Serializable, java.lang.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:
    Serialized Form
    • Field Detail

      • TYPE_DEPENDENCY

        public static final java.lang.String TYPE_DEPENDENCY
    • Constructor Detail

      • Dependency

        public Dependency()
    • Method Detail

      • 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 java.lang.String getTargetId()
      • setTargetId

        public void setTargetId​(java.lang.String targetId)
      • getArchivedTargetId

        public java.lang.String getArchivedTargetId()
      • getArchivedTargetTitle

        public java.lang.String getArchivedTargetTitle()
      • isArchived

        public boolean isArchived()
      • isDone

        public boolean isDone()
      • isAborted

        public boolean isAborted()
      • getTargetDisplayPath

        public java.lang.String getTargetDisplayPath()
      • getTargetTitle

        public java.lang.String getTargetTitle()
      • archive

        public void archive()
      • isArchivedAsResolved

        public boolean isArchivedAsResolved()
      • createArchivedTargetTitle

        public static java.lang.String createArchivedTargetTitle​(PlanItem planItem)
      • hasResolvedTarget

        public boolean hasResolvedTarget()
      • hasVariableTarget

        public boolean hasVariableTarget()
      • hasValidArchiveTargetId

        public boolean hasValidArchiveTargetId()