Package com.xebialabs.xlrelease.domain
Class CustomScriptTask
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.BaseScriptTask
com.xebialabs.xlrelease.domain.CustomScriptTask
- All Implemented Interfaces:
com.xebialabs.deployit.plugin.api.udm.ConfigurationItem,Lockable,VisitableItem,Serializable,Comparable<com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem>
@Metadata(label="Python Script",
versioned=false)
public class CustomScriptTask
extends BaseScriptTask
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final com.xebialabs.deployit.plugin.api.reflect.Typestatic final StringFields inherited from class com.xebialabs.xlrelease.domain.Task
CATEGORY_INPUT, CATEGORY_OUTPUT, DUE_SOON_THRESHOLD, IS_AUTOMATED_AND_IN_PROGRESS, UNKNOWN_TASK_TYPEFields inherited from interface com.xebialabs.deployit.plugin.api.udm.ConfigurationItem
SYNTHETIC_PROPERTIES_FIELD, TYPE_FIELD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfreezeVariablesInCustomFields(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.booleanbooleanbooleanbooleanbooleanbooleanisPropertyVariableInterpolationOff(PythonScript pythonScript) booleanbooleanbooleanvoidvoidTells the custom script task that the next script needs to be scheduled after this Jython script is finished.voidTells the custom script task that the next script needs to be scheduled after this Jython script is finished with specified delay in seconds.voidsetInterval(Integer interval) voidsetKeepPreviousOutputPropertiesOnRetry(boolean keepPreviousOutputPropertiesOnRetry) voidsetNextScriptPath(String nextScriptPath) voidsetPythonScript(PythonScript pythonScript) voidsetStatusLine(String statusLine) Methods inherited from class com.xebialabs.xlrelease.domain.Task
abort, accept, addWatcher, canBeBackup, canScheduleTaskStart, canStartNow, checkDatesValidity, clearComments, clearModificationAttributes, delayDuringBlackoutHasChanged, deleteAttachment, deleteTask, fail, fail, fail, failureHandlerHasChanged, findComment, freezeVariables, fromType, fromType, generateExecutionId, getAllTasks, getAttachments, getChildren, getCiUid, getComments, getConfigurationUri, getContainer, getDelayedCount, getDisplayPath, getElapsedDurationFraction, getExecutionId, getFacets, getFailureHandler, getFailuresCount, getFlaggedCount, getInputVariables, getMaxCommentSize, getOriginalScheduledStartDate, getPhase, getPrecondition, getReferencedVariables, getRelease, getReleaseOwner, getReleaseUid, getStatus, getTags, getTaskRecoverOp, getTaskType, getTeam, getUrl, getVariableMapping, getWatchers, hasBeenDelayed, hasBeenFlagged, hasBeenStarted, 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, isPreconditionInProgress, isSkipped, isSkippedInAdvance, isStillExecutingScript, isTaskFailureHandlerEnabled, isTaskGroup, isUpdatable, isWaitForScheduledStartDate, isWaitingForInput, lock, markAsDone, ownerHasBeenReassigned, postponeUntilEnvironmentsAreReserved, preconditionHasChanged, removeWatcher, reopen, replaceTask, resetToPlanned, 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, shouldNotifyDueSoon, shouldPreconditionBeChecked, start, startPending, startWithInput, teamHasBeenReassigned, unlock, updateCommentMethods 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
-
UNKNOWN_TYPE
public static final com.xebialabs.deployit.plugin.api.reflect.Type UNKNOWN_TYPE -
PYTHON_SCRIPT_PREFIX
- See Also:
-
IGNORE_SCRIPT_VARIABLE_INTERPOLATION
- See Also:
-
SCRIPT_PROPERTY_NAME
- See Also:
-
WAIT_FOR_SIGNAL_PROPERTY_NAME
- See Also:
-
-
Constructor Details
-
CustomScriptTask
public CustomScriptTask()
-
-
Method Details
-
freezeVariablesInCustomFields
public Set<String> freezeVariablesInCustomFields(Map<String, ValueWithInterpolation> variables, Map<String, String> passwordVariables, Changes changes, boolean freezeEvenIfUnresolved) Description copied from class:TaskTo 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.- Overrides:
freezeVariablesInCustomFieldsin classTask
-
isPreconditionEnabled
public boolean isPreconditionEnabled()- Overrides:
isPreconditionEnabledin classTask
-
isFailureHandlerEnabled
public boolean isFailureHandlerEnabled()- Overrides:
isFailureHandlerEnabledin classTask
-
getPythonScript
-
setPythonScript
-
getEngine
- Specified by:
getEnginein classBaseScriptTask
-
getStatusLine
-
setStatusLine
-
getVariableUsages
- Overrides:
getVariableUsagesin classTask
-
setNextScriptPath
-
getNextScriptPath
-
getInterval
-
setInterval
-
hasNextScriptToExecute
public boolean hasNextScriptToExecute() -
schedule
Tells the custom script task that the next script needs to be scheduled after this Jython script is finished. The passed script path must be a valid Jython script on the classpath. -
schedule
Tells the custom script task that the next script needs to be scheduled after this Jython script is finished with specified delay in seconds. The passed script path must be a valid Jython script on the classpath. The passed interval must be any value between 1 and 231-1. -
resetSchedule
public void resetSchedule() -
fail
-
isWaitingForSignal
public boolean isWaitingForSignal() -
retry
-
getScriptPath
-
hasAbortScript
public boolean hasAbortScript()- Overrides:
hasAbortScriptin classTask
-
getAbortScriptPath
-
getAbortScript
- Overrides:
getAbortScriptin classTask- Throws:
IOException
-
isPropertyVariableInterpolationOff
-
isUnknown
public boolean isUnknown() -
isKeepPreviousOutputPropertiesOnRetry
public boolean isKeepPreviousOutputPropertiesOnRetry() -
setKeepPreviousOutputPropertiesOnRetry
public void setKeepPreviousOutputPropertiesOnRetry(boolean keepPreviousOutputPropertiesOnRetry) -
isSupportedInWorkflow
public boolean isSupportedInWorkflow()- Overrides:
isSupportedInWorkflowin classTask
-