Package com.xebialabs.xlrelease.domain
Class Task
java.lang.Object
com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem
com.xebialabs.xlrelease.domain.PlanItem
com.xebialabs.xlrelease.domain.Task
- All Implemented Interfaces:
com.xebialabs.deployit.plugin.api.udm.ConfigurationItem,Lockable,VisitableItem,Serializable,Comparable<com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem>
- Direct Known Subclasses:
BaseScriptTask,ContainerTask,CreateReleaseTask,GateTask,NotificationTask,TaskGroup,UserInputTask
@Metadata(label="Manual",
versioned=false,
description="Describes an action that is not automated and requires a human to mark completion")
public class Task
extends PlanItem
implements Lockable
An Digital.ai Release task. See also
GateTask.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final doublestatic final com.xebialabs.deployit.plugin.api.reflect.TypeFields inherited from interface com.xebialabs.deployit.plugin.api.udm.ConfigurationItem
SYNTHETIC_PROPERTIES_FIELD, TYPE_FIELD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabort()voidaccept(ReleaseVisitor visitor) voidaddWatcher(String watcher) booleanbooleanbooleanvoidvoidvoidbooleanvoiddeleteAttachment(String attachmentId) voiddeleteTask(Task task) booleanfailureHandlerHasChanged(Task task) findComment(String commentId) freezeVariables(Changes changes, boolean freezeEvenIfUnresolved) 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.static <T extends Task>
TfromType(com.xebialabs.deployit.plugin.api.reflect.Type taskType) static <T extends Task>
TvoidgetCiUid()intdoubleintintintgetPhase()getTags()com.xebialabs.deployit.plugin.api.reflect.TypegetTeam()getUrl()booleanbooleanbooleanbooleanbooleanhasTeam()booleanbooleanbooleanbooleanisActive()booleanisAssignedTo(Team team) booleanbooleanbooleanstatic booleanisDefaultTaskType(com.xebialabs.deployit.plugin.api.reflect.Type type) booleanbooleanbooleanisDone()booleanbooleanbooleanbooleanbooleanisFailed()booleanbooleanbooleanbooleanisGate()booleanbooleanisLocked()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisStillExecutingScript(String executionId) booleanbooleanbooleanbooleanbooleanbooleanvoidlock()markAsDone(String targetId, TaskStatus status) booleanownerHasBeenReassigned(Task task) postponeUntilEnvironmentsAreReserved(Date postponeUntil) booleanpreconditionHasChanged(Task task) voidremoveWatcher(String watcher) reopen()voidreplaceTask(Task task) voidsetAttachments(List<Attachment> attachments) voidsetCheckAttributes(boolean checkAttributes) voidvoidsetConfigurationUri(String configurationUri) voidsetContainer(TaskContainer container) voidsetDelayDuringBlackout(boolean delayDuringBlackout) voidsetDocumentationPage(String documentationPage) voidsetDueSoonNotified(boolean dueSoonNotified) voidsetExecutionId(String executionId) voidvoidsetFailureHandler(String failureHandler) voidsetFailuresCount(int failuresCount) voidsetFlagStatus(FlagStatus flagStatus) voidsetHasBeenDelayed(boolean hasBeenDelayed) voidsetHasBeenFlagged(boolean hasBeenFlagged) voidsetLocked(boolean locked) voidsetMaxCommentSize(int maxCommentSize) voidsetOriginalScheduledStartDate(Date originalDate) voidsetPostponedDueToBlackout(boolean delay) setPostponedUntilEnvironmentsAreReserved(boolean postponedUntilEnvironmentsAreReserved) voidsetPrecondition(String precondition) voidsetReleaseUid(Integer releaseUid) voidsetScheduledStartDate(Date scheduledStartDate) voidsetStatus(TaskStatus status) voidsetSupportedInWorkflow(boolean supportedInWorkflow) voidvoidsetTaskFailureHandlerEnabled(boolean taskFailureHandlerEnabled) voidsetTaskRecoverOp(TaskRecoverOp taskRecoverOp) voidvoidsetVariableMapping(Map<String, String> variableMapping) voidsetWaitForScheduledStartDate(boolean waitForScheduledStartDate) voidsetWatchers(Set<String> watchers) booleanbooleanbooleanstart()startPending(String targetId) booleanteamHasBeenReassigned(Task task) voidunlock()voidupdateComment(Comment originalComment, Comment updatedComment) Methods inherited from class com.xebialabs.xlrelease.domain.PlanItem
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, updateDurationMethods 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, 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
-
Field Details
-
CATEGORY_INPUT
- See Also:
-
CATEGORY_OUTPUT
- See Also:
-
DUE_SOON_THRESHOLD
public static final double DUE_SOON_THRESHOLD- See Also:
-
UNKNOWN_TASK_TYPE
public static final com.xebialabs.deployit.plugin.api.reflect.Type UNKNOWN_TASK_TYPE -
IS_AUTOMATED_AND_IN_PROGRESS
-
-
Constructor Details
-
Task
public Task()
-
-
Method Details
-
getConfigurationUri
-
setConfigurationUri
-
getCiUid
-
setCiUid
-
getDocumentationPage
-
setDocumentationPage
-
getComments
-
getContainer
-
setContainer
-
getStatus
-
setStatus
-
getTeam
-
hasTeam
public boolean hasTeam() -
setTeam
-
getWatchers
-
setWatchers
-
addWatcher
-
removeWatcher
-
setPrecondition
-
getPrecondition
-
getFailureHandler
-
getAbortScript
- Throws:
IOException
-
setFailureHandler
-
isTaskFailureHandlerEnabled
public boolean isTaskFailureHandlerEnabled() -
setTaskFailureHandlerEnabled
public void setTaskFailureHandlerEnabled(boolean taskFailureHandlerEnabled) -
getTaskRecoverOp
-
setTaskRecoverOp
-
getTags
-
setTags
-
isCheckAttributes
public boolean isCheckAttributes() -
setCheckAttributes
public void setCheckAttributes(boolean checkAttributes) -
setVariableMapping
-
getVariableMapping
-
hasVariableMapping
public boolean hasVariableMapping() -
setMaxCommentSize
public void setMaxCommentSize(int maxCommentSize) -
getMaxCommentSize
public int getMaxCommentSize() -
getLastStatusChangeBy
-
isDefaultTaskType
public static boolean isDefaultTaskType(com.xebialabs.deployit.plugin.api.reflect.Type type) -
fromType
-
fromType
-
getPhase
-
start
-
canStartNow
public boolean canStartNow() -
canScheduleTaskStart
public boolean canScheduleTaskStart() -
startPending
-
startWithInput
-
retry
-
setScheduledStartDate
- Overrides:
setScheduledStartDatein classPlanItem
-
shouldFacetBeChecked
public boolean shouldFacetBeChecked() -
canBeBackup
public boolean canBeBackup() -
shouldPreconditionBeChecked
public boolean shouldPreconditionBeChecked() -
postponeUntilEnvironmentsAreReserved
-
markAsDone
- Parameters:
targetId- since tasks nest, this can either be the id of this task or the id of one of its children
-
fail
-
fail
-
fail
-
fail
-
reopen
-
abort
-
hasBeenStarted
public boolean hasBeenStarted()- Specified by:
hasBeenStartedin classPlanItem
-
hasBeenFlagged
public boolean hasBeenFlagged() -
getFlaggedCount
public int getFlaggedCount() -
getDelayedCount
public int getDelayedCount() -
hasBeenDelayed
public boolean hasBeenDelayed() -
getFailuresCount
public int getFailuresCount() -
setHasBeenFlagged
public void setHasBeenFlagged(boolean hasBeenFlagged) -
setHasBeenDelayed
public void setHasBeenDelayed(boolean hasBeenDelayed) -
setFailuresCount
public void setFailuresCount(int failuresCount) -
isDone
public boolean isDone() -
isDoneInAdvance
public boolean isDoneInAdvance() -
isDefunct
public boolean isDefunct() -
isUpdatable
public boolean isUpdatable()- Specified by:
isUpdatablein classPlanItem
-
isAborted
public boolean isAborted() -
isNotYetReached
public boolean isNotYetReached() -
isPlanned
public boolean isPlanned() -
isActive
public boolean isActive() -
isInProgress
public boolean isInProgress() -
isPending
public boolean isPending() -
isWaitingForInput
public boolean isWaitingForInput() -
isFailed
public boolean isFailed() -
isFailing
public boolean isFailing() -
isCompletedInAdvance
public boolean isCompletedInAdvance() -
isSkipped
public boolean isSkipped() -
isSkippedInAdvance
public boolean isSkippedInAdvance() -
isPreconditionInProgress
public boolean isPreconditionInProgress() -
isFailureHandlerInProgress
public boolean isFailureHandlerInProgress() -
isAbortScriptInProgress
public boolean isAbortScriptInProgress() -
isFacetInProgress
public boolean isFacetInProgress() -
hasAbortScript
public boolean hasAbortScript() -
isMovable
public boolean isMovable() -
isAssignedTo
-
isGate
public boolean isGate() -
isTaskGroup
public boolean isTaskGroup() -
isParallelGroup
public boolean isParallelGroup() -
getAttachments
-
setAttachments
-
isPreconditionEnabled
public boolean isPreconditionEnabled() -
isFailureHandlerEnabled
public boolean isFailureHandlerEnabled() -
getExecutionId
-
setExecutionId
-
generateExecutionId
public void generateExecutionId() -
deleteAttachment
-
resetToPlanned
-
setFlagStatus
- Overrides:
setFlagStatusin classPlanItem
-
getRelease
- Specified by:
getReleasein classPlanItem
-
getReleaseUid
- Specified by:
getReleaseUidin classPlanItem
-
setReleaseUid
- Specified by:
setReleaseUidin classPlanItem
-
getDisplayPath
- Specified by:
getDisplayPathin classPlanItem
-
getReleaseOwner
-
getAllTasks
-
getChildren
- Specified by:
getChildrenin classPlanItem
-
accept
- Specified by:
acceptin interfaceVisitableItem
-
getVariableUsages
- Specified by:
getVariableUsagesin classPlanItem
-
freezeVariables
-
getInputVariables
-
getReferencedVariables
-
getReferencedVariableKeys
-
freezeVariablesInCustomFields
public 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.
ApplyVariableHelper.replaceAll(Object, Map, Set, boolean)to each field; if child entities are modified, add them tochanges. -
isWaitForScheduledStartDate
public boolean isWaitForScheduledStartDate() -
setWaitForScheduledStartDate
public void setWaitForScheduledStartDate(boolean waitForScheduledStartDate) -
isDelayDuringBlackout
public boolean isDelayDuringBlackout() -
setDelayDuringBlackout
public void setDelayDuringBlackout(boolean delayDuringBlackout) -
checkDatesValidity
public void checkDatesValidity() -
isAutomated
public boolean isAutomated() -
ownerHasBeenReassigned
-
teamHasBeenReassigned
-
delayDuringBlackoutHasChanged
-
failureHandlerHasChanged
-
preconditionHasChanged
-
getTaskType
public com.xebialabs.deployit.plugin.api.reflect.Type getTaskType() -
isStillExecutingScript
-
isPostponedDueToBlackout
public boolean isPostponedDueToBlackout() -
setPostponedDueToBlackout
public void setPostponedDueToBlackout(boolean delay) -
getOriginalScheduledStartDate
-
setOriginalScheduledStartDate
-
isDueSoon
public boolean isDueSoon() -
getElapsedDurationFraction
public double getElapsedDurationFraction() -
shouldNotifyDueSoon
public boolean shouldNotifyDueSoon() -
isDueSoonNotified
public boolean isDueSoonNotified() -
setDueSoonNotified
public void setDueSoonNotified(boolean dueSoonNotified) -
deleteTask
-
replaceTask
-
findComment
-
updateComment
-
clearComments
public void clearComments() -
clearModificationAttributes
public void clearModificationAttributes() -
isLocked
public boolean isLocked() -
setLocked
public void setLocked(boolean locked) -
lock
public void lock() -
unlock
public void unlock() -
isSupportedInWorkflow
public boolean isSupportedInWorkflow() -
setSupportedInWorkflow
public void setSupportedInWorkflow(boolean supportedInWorkflow) -
getFacets
-
setFacets
-
getUrl
-
isPostponedUntilEnvironmentsAreReserved
public boolean isPostponedUntilEnvironmentsAreReserved() -
setPostponedUntilEnvironmentsAreReserved
-