Package com.xebialabs.xlrelease.domain

# Class CreateReleaseTask

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

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

@Metadata(label="Create Release", versioned=false, description="Automates the creation of a new release") public class CreateReleaseTask extends Task

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `CREATED_RELEASE_ID`
  `static final String`
  `FOLDER_ID`
  `static final String`
  `TEMPLATE_ID`
  `protected List<Variable>`
  `templateVariables`

  ### 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
  `CreateReleaseTask()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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`
  `getCreatedReleaseId()`
  `String`
  `getFolderId()`
  `String`
  `getNewReleaseTitle()`
  `Set<String>`
  `getReleaseTags()`
  `RiskProfile`
  `getRiskProfile()`
  `boolean`
  `getStartRelease()`
  `String`
  `getTemplateId()`
  `String`
  `getTemplateIdVariable()`
  `List<Variable>`
  `getTemplateVariables()`
  `Map<String,Variable>`
  `getTemplateVariablesByKeys()`
  `List<UsagePoint>`
  `getVariableUsages()`
  `boolean`
  `getWaitForRelease()`
  `void`
  `setCreatedReleaseId(String createdReleaseId)`
  `void`
  `setFolderId(String folderId)`
  `void`
  `setNewReleaseTitle(String newReleaseTitle)`
  `void`
  `setReleaseTags(Set<String> releaseTags)`
  `void`
  `setRiskProfile(RiskProfile riskProfile)`
  `void`
  `setStartRelease(boolean startRelease)`
  `void`
  `setTemplateId(String templateId)`
  `void`
  `setTemplateIdVariable(String templateIdVariable)`
  `void`
  `setTemplateVariables(List<Variable> variables)`
  `void`
  `setWaitForRelease(boolean waitForRelease)`
  `protected boolean`
  `shouldFreezeVariableMapping(CiProperty property)`

  ### 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, getConfigurationUri, getContainer, getDelayedCount, getDisplayPath, getDocumentationPage, getElapsedDurationFraction, getExecutionId, getFacets, getFailureHandler, getFailuresCount, getFlaggedCount, getInputVariables, getLastStatusChangeBy, getMaxCommentSize, getOriginalScheduledStartDate, getPhase, getPrecondition, 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, markAsDone, ownerHasBeenReassigned, postponeUntilEnvironmentsAreReserved, preconditionHasChanged, removeWatcher, reopen, replaceTask, resetToPlanned, retry, setAttachments, setCheckAttributes, setCiUid, setConfigurationUri, setContainer, setDelayDuringBlackout, setDocumentationPage, setDueSoonNotified, setExecutionId, setFacets, setFailureHandler, setFailuresCount, setFlagStatus, setHasBeenDelayed, setHasBeenFlagged, setLocked, setMaxCommentSize, setOriginalScheduledStartDate, setPostponedDueToBlackout, setPostponedUntilEnvironmentsAreReserved, setPrecondition, setReleaseUid, setScheduledStartDate, setStatus, setStatusLine, setSupportedInWorkflow, setTags, setTaskFailureHandlerEnabled, setTaskRecoverOp, setTeam, setVariableMapping, setWaitForScheduledStartDate, setWatchers, shouldFacetBeChecked, 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`

- ## Field Details

  - ### CREATED_RELEASE_ID

    public static final String CREATED_RELEASE_ID
    See Also:
      - Constant Field Values

  - ### TEMPLATE_ID

    public static final String TEMPLATE_ID
    See Also:
      - Constant Field Values

  - ### FOLDER_ID

    public static final String FOLDER_ID
    See Also:
      - Constant Field Values

  - ### templateVariables

    @Property(asContainment=true, required=false, label="Variables", description="Variable values to pass to the created release.") protected List<Variable> templateVariables

- ## Constructor Details

  - ### CreateReleaseTask

    public CreateReleaseTask()

- ## Method Details

  - ### execute

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

  - ### 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`

  - ### shouldFreezeVariableMapping

    protected boolean shouldFreezeVariableMapping(CiProperty property)
    Overrides:
      `shouldFreezeVariableMapping` in class `Task`

  - ### getVariableUsages

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

  - ### getNewReleaseTitle

    public String getNewReleaseTitle()

  - ### setNewReleaseTitle

    public void setNewReleaseTitle(String newReleaseTitle)

  - ### getTemplateId

    public String getTemplateId()

  - ### setTemplateId

    public void setTemplateId(String templateId)

  - ### getFolderId

    public String getFolderId()

  - ### setFolderId

    public void setFolderId(String folderId)

  - ### getCreatedReleaseId

    public String getCreatedReleaseId()

  - ### setCreatedReleaseId

    public void setCreatedReleaseId(String createdReleaseId)

  - ### getTemplateVariables

    public List<Variable> getTemplateVariables()

  - ### setTemplateVariables

    public void setTemplateVariables(List<Variable> variables)

  - ### getStartRelease

    public boolean getStartRelease()

  - ### setStartRelease

    public void setStartRelease(boolean startRelease)

  - ### getReleaseTags

    public Set<String> getReleaseTags()

  - ### setReleaseTags

    public void setReleaseTags(Set<String> releaseTags)

  - ### getRiskProfile

    public RiskProfile getRiskProfile()

  - ### setRiskProfile

    public void setRiskProfile(RiskProfile riskProfile)

  - ### getWaitForRelease

    public boolean getWaitForRelease()

  - ### setWaitForRelease

    public void setWaitForRelease(boolean waitForRelease)

  - ### getTemplateIdVariable

    public String getTemplateIdVariable()

  - ### setTemplateIdVariable

    public void setTemplateIdVariable(String templateIdVariable)

  - ### getTemplateVariablesByKeys

    public Map<String,Variable> getTemplateVariablesByKeys()