Package com.xebialabs.xlrelease.domain

## Class TaskGroup

- 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.TaskGroup

- All Implemented Interfaces:
    `ConfigurationItem`, `Lockable`, `TaskContainer`, `VisitableItem`, `java.io.Serializable`, `java.lang.Comparable<BaseConfigurationItem>`
  Direct Known Subclasses:
    `ParallelGroup`, `SequentialGroup`

      @Metadata(label="Task Group (Parallel or Sequential)",
                versioned=false,
                virtual=true)
      public abstract class TaskGroup
      extends Task
      implements TaskContainer

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected java.util.List<Task>` | `tasks` |

    - ### 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, status, 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
    --- | ---
    `TaskGroup()` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Changes` | `abort()` |
    `void` | `accept​(ReleaseVisitor visitor)` |
    `void` | `addTask​(Task task, int position)` |
    `void` | `deleteTask​(Task task)` |
    `Changes` | `fail​(java.lang.String targetId, java.lang.String failReason)` |
    `Changes` | `fail​(java.lang.String targetId, java.lang.String failReason, boolean fromAbort)` |
    `Changes` | `fail​(java.lang.String targetId, java.lang.String failReason, User user, boolean fromAbort)` |
    `java.util.List<Task>` | `getAllTasks()` |
    `java.util.List<PlanItem>` | `getChildren()` |
    `int` | `getDelayedCount()` |
    `int` | `getFlaggedCount()` |
    `Task` | `getTask​(java.lang.Integer index)` |
    `java.util.List<Task>` | `getTasks()` |
    `protected java.util.List<java.lang.String>` | `getUnboundRequiredVariables()` |
    `boolean` | `isFailureHandlerEnabled()` |
    `boolean` | `isSkippableOrRetriable()` |
    `boolean` | `isUpdatable()` |
    `Changes` | `markAsDone​(java.lang.String targetId, TaskStatus status)` |
    `Changes` | `resetToPlanned()` |
    `Changes` | `retry​(java.lang.String targetId)` |
    `abstract void` | `setTasks​(java.util.List<Task> tasks)` |
    `Changes` | `startNow​(java.lang.String targetId, boolean shouldBePending)` |
    `protected abstract Changes` | `startSubTasksIfPreconditionNotInProgress()` |
    `protected abstract Changes` | `tryToStartPlanningTargets​(Task task)` |
    `protected void` | `updateGroupStatusIfNecessary​(Changes changes)` |

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

      `addWatcher, applyDefaults, canBeBackup, canScheduleTaskStart, canStartNow, checkDatesValidity, clearComments, delayDuringBlackoutHasChanged, deleteAttachment, execute, fail, failureHandlerHasChanged, findComment, freezeVariables, freezeVariablesInCustomFields, fromType, fromType, generateExecutionId, getAbortScript, getAttachments, getCiUid, getComments, getConfigurationUri, getContainer, getDisplayPath, getElapsedDurationFraction, getExecutionId, getFacets, getFailureHandler, getFailuresCount, getInputVariables, getMaxCommentSize, getOriginalScheduledStartDate, getPhase, getPrecondition, getReferencedVariables, getRelease, getReleaseOwner, getReleaseUid, getStatus, getTags, getTaskRecoverOp, getTaskType, getTeam, getUrl, getVariableMapping, getVariableUsages, 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, isFailureHandlerInProgress, isGate, isInProgress, isLocked, isMovable, isNotYetReached, isParallelGroup, isPending, isPlanned, isPostponedDueToBlackout, isPostponedUntilEnvironmentsAreReserved, isPreconditionEnabled, isPreconditionInProgress, isSkipped, isSkippedInAdvance, isStillExecutingScript, isSupportedInWorkflow, isTaskFailureHandlerEnabled, isTaskGroup, isWaitForScheduledStartDate, isWaitingForInput, lock, ownerHasBeenReassigned, postponeUntilEnvironmentsAreReserved, preconditionHasChanged, removeWatcher, reopen, replaceTask, setAttachments, setCheckAttributes, setCiUid, setConfigurationUri, setContainer, setDelayDuringBlackout, setDueSoonNotified, setExecutionId, setFacets, setFailureHandler, setFailuresCount, setFlagStatus, setHasBeenDelayed, setHasBeenFlagged, setLocked, setMaxCommentSize, setOriginalScheduledStartDate, setPostponedDueToBlackout, setPostponedUntilEnvironmentsAreReserved, setPrecondition, setReleaseUid, setScheduledStartDate, setStatus, setSupportedInWorkflow, setTags, setTaskFailureHandlerEnabled, setTaskRecoverOp, setTeam, setVariableMapping, setWaitForScheduledStartDate, setWatchers, shouldFacetBeChecked, shouldFreezeVariableMapping, shouldNotifyDueSoon, shouldPreconditionBeChecked, start, 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`

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

      `get$directoryReference, get$internalId, get$referenceId, get$securedCi, get$securedDirectoryReference, get$validationMessages, getId, getName, getProperty, getType, hasProperty, setId, setProperty`

    - ### Methods inherited from interface com.xebialabs.xlrelease.domain.TaskContainer

      `getTitle, isLocked, replaceTask, replaceTask`

- - ### Field Detail

    - #### tasks

          @Property(asContainment=true,
                    required=false)
          protected java.util.List<Task> tasks

  - ### Constructor Detail

    - #### TaskGroup

          public TaskGroup()

  - ### Method Detail

    - #### getTasks

          public java.util.List<Task> getTasks()

      Specified by:
        `getTasks` in interface `TaskContainer`

    - #### setTasks

          public abstract void setTasks​(java.util.List<Task> tasks)

      Specified by:
        `setTasks` in interface `TaskContainer`

    - #### getTask

          public Task getTask​(java.lang.Integer index)

    - #### getAllTasks

          public java.util.List<Task> getAllTasks()

      Overrides:
        `getAllTasks` in class `Task`

    - #### getChildren

          public java.util.List<PlanItem> getChildren()

      Overrides:
        `getChildren` in class `Task`

    - #### accept

          public void accept​(ReleaseVisitor visitor)

      Specified by:
        `accept` in interface `VisitableItem`
      Overrides:
        `accept` in class `Task`

    - #### tryToStartPlanningTargets

          protected abstract Changes tryToStartPlanningTargets​(Task task)

    - #### startSubTasksIfPreconditionNotInProgress

          protected abstract Changes startSubTasksIfPreconditionNotInProgress()

    - #### startNow

          public Changes startNow​(java.lang.String targetId,
                                  boolean shouldBePending)

      Overrides:
        `startNow` in class `Task`

    - #### markAsDone

          public Changes markAsDone​(java.lang.String targetId,
                                    TaskStatus status)

      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

    - #### fail

          public Changes fail​(java.lang.String targetId,
                              java.lang.String failReason)

      Overrides:
        `fail` in class `Task`

    - #### fail

          public Changes fail​(java.lang.String targetId,
                              java.lang.String failReason,
                              boolean fromAbort)

      Overrides:
        `fail` in class `Task`

    - #### fail

          public Changes fail​(java.lang.String targetId,
                              java.lang.String failReason,
                              User user,
                              boolean fromAbort)

      Overrides:
        `fail` in class `Task`

    - #### abort

          public Changes abort()

      Overrides:
        `abort` in class `Task`

    - #### resetToPlanned

          public Changes resetToPlanned()

      Overrides:
        `resetToPlanned` in class `Task`

    - #### retry

          public Changes retry​(java.lang.String targetId)

      Overrides:
        `retry` in class `Task`

    - #### updateGroupStatusIfNecessary

          protected void updateGroupStatusIfNecessary​(Changes changes)

    - #### isUpdatable

          public boolean isUpdatable()

      Overrides:
        `isUpdatable` in class `Task`

    - #### isSkippableOrRetriable

          public boolean isSkippableOrRetriable()

    - #### getFlaggedCount

          public int getFlaggedCount()

      Overrides:
        `getFlaggedCount` in class `Task`

    - #### getDelayedCount

          public int getDelayedCount()

      Overrides:
        `getDelayedCount` in class `Task`

    - #### getUnboundRequiredVariables

          protected java.util.List<java.lang.String> getUnboundRequiredVariables()

      Overrides:
        `getUnboundRequiredVariables` in class `Task`

    - #### deleteTask

          public void deleteTask​(Task task)

      Overrides:
        `deleteTask` in class `Task`

    - #### addTask

          public void addTask​(Task task,
                              int position)

      Specified by:
        `addTask` in interface `TaskContainer`

    - #### isFailureHandlerEnabled

          public boolean isFailureHandlerEnabled()

      Overrides:
        `isFailureHandlerEnabled` in class `Task`