Package com.xebialabs.xlrelease.domain

# Class GateTask

java.lang.Object
com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem
com.xebialabs.xlrelease.domain.PlanItem
com.xebialabs.xlrelease.domain.Task
com.xebialabs.xlrelease.domain.GateTask

All Implemented Interfaces:
  `ConfigurationItem`, `Lockable`, `VisitableItem`, `Serializable`, `Comparable<BaseConfigurationItem>`

@Metadata(label="Gate", versioned=false, description="Checks conditions that must be fulfilled before the release can continue") public class GateTask extends Task

See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class com.xebialabs.xlrelease.domain.Task

  `CATEGORY_INPUT, CATEGORY_OUTPUT, delayDuringBlackout, DUE_SOON_THRESHOLD, executionId, failureHandler, failuresCount, hasBeenDelayed, hasBeenFlagged, IS_AUTOMATED_AND_IN_PROGRESS, maxCommentSize, originalScheduledStartDate, postponedDueToBlackout, postponedUntilEnvironmentsAreReserved, precondition, tags, taskFailureHandlerEnabled, taskRecoverOp, team, UNKNOWN_TASK_TYPE, variableMapping, waitForScheduledStartDate`

  ### Fields inherited from class com.xebialabs.xlrelease.domain.PlanItem

  `BY_TITLE, description, dueDate, endDate, flagComment, flagStatus, overdueNotified, owner, plannedDuration, scheduledStartDate, startDate, title`

  ### Fields inherited from class com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem

  `id, syntheticProperties, type`

  ### Fields inherited from interface com.xebialabs.deployit.plugin.api.udm.ConfigurationItem

  `SYNTHETIC_PROPERTIES_FIELD, TYPE_FIELD`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GateTask()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addCondition(GateCondition condition)`
  `void`
  `addDependency(Dependency dependency)`
  `protected Changes`
  `execute(String targetId, TaskStartOrRetryOperation operation)`
  `Set<String>`
  `freezeVariablesInCustomFields(Map<String,ValueWithInterpolation> variables, Map<String,String> passwordVariables, Changes changes, boolean freezeEvenIfUnresolved)`
  To be overridden in child classes with custom fields that can contain variables.
  `String`
  `getAbortedDependencyTitles()`
  `GateCondition`
  `getCondition(String id)`
  `List<GateCondition>`
  `getConditions()`
  `List<Dependency>`
  `getDependencies()`
  `String`
  `getTaskColor()`
  `List<UsagePoint>`
  `getVariableUsages()`
  `boolean`
  `hasAbortedDependencies()`
  `boolean`
  `hasConditions()`
  `boolean`
  `hasDependencies()`
  `boolean`
  `hasFailureDependency()`
  `boolean`
  `isCompletable()`
  `boolean`
  `isOpen()`
  `boolean`
  `isTransitionToFailed()`
  `Changes`
  `markAsDone(String targetId, TaskStatus targetStatus)`
  `Changes`
  `retry(String targetId)`
  `void`
  `setConditions(List<GateCondition> conditions)`
  `void`
  `setDependencies(List<Dependency> dependencies)`
  `void`
  `setTransitionToFailed(boolean transitionToFailed)`
  `void`
  `updateCondition(GateCondition gateCondition)`

  ### Methods inherited from class com.xebialabs.xlrelease.domain.Task

  `abort, accept, addWatcher, applyDefaults, canBeBackup, canScheduleTaskStart, canStartNow, checkDatesValidity, clearComments, clearModificationAttributes, delayDuringBlackoutHasChanged, deleteAttachment, deleteTask, fail, fail, fail, fail, failureHandlerHasChanged, findComment, freezeVariables, fromType, fromType, generateExecutionId, getAbortScript, getAllTasks, getAttachments, getChildren, getCiUid, getComments, getContainer, getDelayedCount, getDisplayPath, getDocumentationPage, getElapsedDurationFraction, getExecutionId, getFacets, getFailureHandler, getFailuresCount, getFlaggedCount, getInputVariables, getLastStatusChangeBy, getMaxCommentSize, getOriginalScheduledStartDate, getPhase, getPrecondition, getPreconditionType, getReferencedVariableKeys, getReferencedVariables, getRelease, getReleaseOwner, getReleaseUid, getStatus, getStatusLine, getTags, getTaskRecoverOp, getTaskType, getTeam, getUnboundRequiredVariables, getUrl, getVariableMapping, getWatchers, hasAbortScript, hasBeenDelayed, hasBeenFlagged, hasBeenStarted, hasFailureHandlerScript, hasTaskRecoverOp, hasTeam, hasVariableMapping, isAborted, isAbortScriptInProgress, isActive, isAssignedTo, isAutomated, isCheckAttributes, isCompletedInAdvance, isDefaultTaskType, isDefunct, isDelayDuringBlackout, isDone, isDoneInAdvance, isDueSoon, isDueSoonNotified, isFacetInProgress, isFailed, isFailing, isFailureHandlerEnabled, isFailureHandlerInProgress, isGate, isInProgress, isLocked, isMovable, isNotYetReached, isParallelGroup, isPending, isPlanned, isPostponedDueToBlackout, isPostponedUntilEnvironmentsAreReserved, isPreconditionEnabled, isPreconditionInProgress, isSkipped, isSkippedInAdvance, isStillExecutingScript, isSupportedInWorkflow, isTaskFailureHandlerEnabled, isTaskGroup, isUpdatable, isWaitForScheduledStartDate, isWaitingForInput, lock, markAsFailing, ownerHasBeenReassigned, postponeUntilEnvironmentsAreReserved, preconditionHasChanged, removeWatcher, reopen, replaceTask, resetToPlanned, setAttachments, setCheckAttributes, setCiUid, setContainer, setDelayDuringBlackout, setDocumentationPage, setDueSoonNotified, setExecutionId, setFacets, setFailureHandler, setFailuresCount, setFlagStatus, setHasBeenDelayed, setHasBeenFlagged, setLocked, setMaxCommentSize, setOriginalScheduledStartDate, setPostponedDueToBlackout, setPostponedUntilEnvironmentsAreReserved, setPrecondition, setPreconditionType, setReleaseUid, setScheduledStartDate, setStatus, setStatusLine, setSupportedInWorkflow, setTags, setTaskFailureHandlerEnabled, setTaskRecoverOp, setTeam, setVariableMapping, setWaitForScheduledStartDate, setWatchers, shouldFacetBeChecked, shouldFreezeVariableMapping, shouldNotifyDueSoon, shouldPreconditionBeChecked, start, startNow, startPending, startWithInput, teamHasBeenReassigned, unlock, updateComment`

  ### Methods inherited from class com.xebialabs.xlrelease.domain.PlanItem

  `calculateDueDate, checkDatesValidity, getActualDuration, getComputedPlannedDuration, getDescription, getDueDate, getEndDate, getEndOrDueDate, getFlagComment, getFlagStatus, getOrCalculateDueDate, getOwner, getPlannedDuration, getScheduledStartDate, getStartDate, getStartOrScheduledDate, getTitle, hasDueDate, hasEndDate, hasEndOrDueDate, hasOwner, hasOwner, hasPlannedDuration, hasScheduledStartDate, hasStartDate, hasStartOrScheduledDate, hasTitle, hasTitle, hasValidStartDates, isFlagged, isOverdue, isOverdueNotified, isTitleContaining, moveChildren, setDates, setDescription, setDueDate, setEndDate, setFlagComment, setOverdueNotified, setOwner, setPlannedDuration, setStartAndEndDatesIfEmpty, setStartDate, setTitle, shouldNotifyOverdue, updateDates, updateDuration`

  ### Methods inherited from class com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem

  `compareTo, equals, get$ciAttributes, get$directoryReference, get$externalProperties, get$internalId, get$referenceId, get$securedCi, get$securedDirectoryReference, get$token, get$validationMessages, getId, getName, getProperty, getPropertyDescriptor, getType, hashCode, hasProperty, set$ciAttributes, set$directoryReference, set$externalProperties, set$internalId, set$referenceId, set$securedCi, set$securedDirectoryReference, set$token, set$validationMessages, setId, setProperty, setType, toString`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### GateTask

    public GateTask()

- ## Method Details

  - ### getConditions

    public List<GateCondition> getConditions()

  - ### addCondition

    public void addCondition(GateCondition condition)

  - ### getCondition

    public GateCondition getCondition(String id)

  - ### hasConditions

    public boolean hasConditions()

  - ### setConditions

    public void setConditions(List<GateCondition> conditions)

  - ### getDependencies

    public List<Dependency> getDependencies()

  - ### setDependencies

    public void setDependencies(List<Dependency> dependencies)

  - ### hasDependencies

    public boolean hasDependencies()

  - ### addDependency

    public void addDependency(Dependency dependency)

  - ### isTransitionToFailed

    public boolean isTransitionToFailed()

  - ### setTransitionToFailed

    public void setTransitionToFailed(boolean transitionToFailed)

  - ### getTaskColor

    public String getTaskColor()

  - ### retry

    public Changes retry(String targetId)
    Overrides:
      `retry` in class `Task`

  - ### execute

    protected Changes execute(String targetId, TaskStartOrRetryOperation operation)
    Overrides:
      `execute` in class `Task`

  - ### markAsDone

    public Changes markAsDone(String targetId, TaskStatus targetStatus)
    Overrides:
      `markAsDone` in class `Task`
    Parameters:
      `targetId` - since tasks nest, this can either be the id of this task or the id of one of its children

  - ### isOpen

    public boolean isOpen()

  - ### isCompletable

    public boolean isCompletable()

  - ### hasFailureDependency

    public boolean hasFailureDependency()

  - ### freezeVariablesInCustomFields

    public Set<String> freezeVariablesInCustomFields(Map<String,ValueWithInterpolation> variables, Map<String,String> passwordVariables, Changes changes, boolean freezeEvenIfUnresolved)
    Description copied from class: `Task`

    To be overridden in child classes with custom fields that can contain variables.

    Apply `VariableHelper.replaceAll(Object, Map, Set, boolean)` to each field; if child entities are modified, add them to `changes`.
    Overrides:
      `freezeVariablesInCustomFields` in class `Task`

  - ### hasAbortedDependencies

    public boolean hasAbortedDependencies()

  - ### getAbortedDependencyTitles

    public String getAbortedDependencyTitles()

  - ### updateCondition

    public void updateCondition(GateCondition gateCondition)

  - ### getVariableUsages

    public List<UsagePoint> getVariableUsages()
    Overrides:
      `getVariableUsages` in class `Task`