Package com.xebialabs.xlrelease.domain
Class Release
java.lang.Object
com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem
com.xebialabs.xlrelease.domain.PlanItem
com.xebialabs.xlrelease.domain.Release
- All Implemented Interfaces:
ConfigurationItem,com.xebialabs.deployit.repository.core.Securable,CiWithInternalMetadata,CiWithUid,VariableContainer,VisitableItem,Serializable,Comparable<BaseConfigurationItem>
@Metadata(description="A release or template.",
root=APPLICATIONS,
versioned=false)
public class Release
extends PlanItem
implements com.xebialabs.deployit.repository.core.Securable, CiWithInternalMetadata, VariableContainer, CiWithUid
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected booleanprotected booleanprotected Stringprotected intprotected booleanprotected Stringprotected booleanprotected booleanstatic final Stringprotected booleanprotected List<ReleaseExtension>protected ReleaseKindprotected TemplateLogoprotected intprotected Stringprotected Dateprotected Dateprotected FlagStatusprotected List<ReleaseTrigger>Deprecated.protected RiskProfilestatic final Stringprotected Stringprotected Stringprotected Stringprotected ReleaseStatusThe Digital.ai Release teams are transient CIs and are kept for backwards-compatibility.protected booleanFields inherited from class com.xebialabs.xlrelease.domain.PlanItem
BY_TITLE, description, dueDate, endDate, flagComment, flagStatus, overdueNotified, owner, plannedDuration, scheduledStartDate, startDate, titleFields inherited from class com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem
id, syntheticProperties, typeFields inherited from interface com.xebialabs.deployit.plugin.api.udm.ConfigurationItem
SYNTHETIC_PROPERTIES_FIELD, TYPE_FIELDFields inherited from interface com.xebialabs.deployit.repository.core.Securable
SECURITY_PERMISSIONS_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabortAsPartOfBulkOperation(String abortComment) voidaccept(ReleaseVisitor visitor) voidvoidvoidvoidaddVariable(Variable variable) voidaddVariables(List<Variable> newVariables) booleanbooleanvoidvoidvoidvoidcheckVariableCanBeAdded(Variable variable) voidvoidcollectVariableReferences(VisitableItem updated) voidvoiddeleteAttachment(String attachmentId) voiddeletePhase(Phase phase) voiddeleteReleaseTriggerById(String triggerId) Deprecated.voiddeleteTask(Task task) voiddeleteTeam(String teamId) filterPhasesContainingInTitle(List<Phase> phases, String partialTitleToLookFor) voidboolean<T> List<T>getAllTasksOfType(Class<T> clazz) getAttachment(String attachmentId) intgetCiUid()getKind()getLogo()intintgetNextPhase(Phase currentPhase) This method is kept for backwards compatibility.getPermissions(String user, List<com.xebialabs.deployit.security.Role> userRoles) getPermissions(Collection<String> principals, List<com.xebialabs.deployit.security.Role> userRoles) getPhasesByTitle(String phaseTitle) getPhasesContainingInTitle(String partialTitleToLookFor) getReleaseTriggerById(String releaseTriggerId) Deprecated.Deprecated.getTags()getTasksByTitle(String phaseTitle, String taskTitle) getTasksUsingAttachment(String attachmentId) getTeams()getTeamsOf(String username, List<com.xebialabs.deployit.security.Role> userRoles) getTeamWithId(String id) getUrl()getVariableById(String variableId) This method is kept for backwards compatibility.booleanbooleanbooleanhasNextPhase(Phase phase) booleanbooleanbooleanbooleanbooleanbooleanbooleanisActive()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisDone()booleanisFailed()booleanbooleanbooleanisPaused()booleanbooleanbooleanbooleanbooleanbooleanbooleanisVariableUsed(Variable variable) booleanmarkTaskAsDone(String taskId, TaskStatus status) removeVariable(String variableId) voidreplaceTask(Task task) voidreplaceTrigger(ReleaseTrigger releaseTrigger) Deprecated.voidreplaceVariable(Variable current, Variable replacement) restorePhases(List<Phase> phases) resume()scanAndAddNewVariables(VisitableItem updated) voidsetAbortOnFailure(boolean abortOnFailure) voidsetAllowConcurrentReleasesFromTrigger(boolean allowConcurrentReleasesFromTrigger) voidsetAllowPasswordsInAllFields(boolean allowPasswordsInAllFields) voidsetAllowTargetFolderOverride(boolean allowTargetFolderOverride) voidsetArchived(boolean isArchived) voidsetArchiveRelease(boolean archiveRelease) voidsetAttachments(List<Attachment> attachments) voidvoidsetAutomatedResumeCount(int automatedResumeCount) voidsetAutoStart(boolean autoStart) voidsetCalendarLinkToken(String calendarLinkToken) voidsetCalendarPublished(boolean calendarPublished) voidsetCategories(Set<String> categories) voidvoidsetCreatedFromTrigger(boolean createdFromTrigger) voidsetDefaultTargetFolderId(String defaultTargetFolderId) voidsetDisableNotifications(boolean disableNotifications) voidsetDueDate(Date value) voidsetEndDate(Date value) voidsetExtensions(List<ReleaseExtension> extensions) voidsetFolderVariables(FolderVariables folderVariables) voidsetGlobalVariables(GlobalVariables globalVariables) voidsetKind(ReleaseKind kind) voidsetLogo(TemplateLogo logo) voidsetMaxAutomatedResumes(int maxAutomatedResumes) voidsetMaxConcurrentReleases(int maxConcurrentReleases) voidsetOriginTemplateId(String originTemplateId) voidsetParentReleaseId(String parentReleaseId) voidsetPasswordVariableValues(Map<String, ?> variableValues) This method is kept for backwards compatibility.voidvoidsetQueryableEndDate(Date queryableEndDate) voidsetQueryableStartDate(Date queryableStartDate) voidsetReleaseTriggers(List<ReleaseTrigger> releaseTriggers) Deprecated.voidsetReleaseUid(Integer releaseUid) voidsetRiskProfile(RiskProfile riskProfile) voidsetRootReleaseId(String rootReleaseId) voidsetScheduledStartDate(Date scheduledStartDate) voidsetScriptUsername(String scriptUsername) voidsetScriptUserPassword(String scriptUserPassword) voidsetStartDate(Date value) voidsetStartedFromTaskId(String startedFromTaskId) voidsetStatus(ReleaseStatus value) voidvoidvoidsetTutorial(boolean tutorial) voidsetVariableMapping(Map<String, String> variableMapping) voidsetVariables(List<Variable> variables) voidsetVariableValues(Map<String, ?> variableValues) This method is kept for backwards compatibility.start()start(boolean releaseStartedImmediatelyAfterBeingCreated) startPendingTask(String taskId) startWithInput(String taskId) taskPreconditionValidated(String taskId) toString()voidvoidupdateDatesForRelease(Date scheduledStartDate, Date dueDate, Integer plannedDuration) voidupdateDatesForTemplate(Date scheduledStartDate, Date dueDate, Integer plannedDuration) voidvoidupdateTeam(Team newTeam) 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, setFlagComment, setFlagStatus, setOverdueNotified, setOwner, setPlannedDuration, setStartAndEndDatesIfEmpty, 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, getPropertyDescriptor, getType, hashCode, hasProperty, set$ciAttributes, set$directoryReference, set$externalProperties, set$internalId, set$referenceId, set$securedCi, set$securedDirectoryReference, set$token, set$validationMessages, setId, setProperty, setTypeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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
-
Field Details
-
SCRIPT_USER_PASSWORD_VARIABLE_MAPPING_KEY
- See Also:
-
DEFAULT_TARGET_FOLDER_ID_PROPERTY_NAME
- See Also:
-
releaseTriggers
@Deprecated @Property(asContainment=true, required=false, description="The triggers that may start a release from a template. (Templates only)", isTransient=true) protected List<ReleaseTrigger> releaseTriggersDeprecated. -
teams
@Property(asContainment=true, required=false, description="The teams configured on the release.", isTransient=true) protected List<Team> teamsThe Digital.ai Release teams are transient CIs and are kept for backwards-compatibility. The teams' data is stored using platform'sRole. The teams need to be exported to template JSONs so they have to be a UDM property. -
phases
@Property(asContainment=true, required=false, description="The list of phases in the release.") protected List<Phase> phases -
queryableStartDate
-
queryableEndDate
-
realFlagStatus
@Property(description="The calculated flag status, derived from the flags from the release and its tasks.", defaultValue="OK") protected FlagStatus realFlagStatus -
status
-
kind
@Property(defaultValue="RELEASE", label="Kind", description="The kind of a template.") protected ReleaseKind kind -
tags
@Property(required=false, description="The tags of the release. Tags can be used for grouping and querying.") protected List<String> tags -
categories
@Property(required=false, description="The categories for the release.") protected Set<String> categories -
variables
@Property(asContainment=true, required=false, description="List of variable CIs representing variables in this release or template") protected List<Variable> variables -
calendarLinkToken
-
calendarPublished
-
tutorial
-
abortOnFailure
@Property(required=false, description="Releases automatically abort when a task fails if this property is set to true.") protected boolean abortOnFailure -
archiveRelease
@Property(required=false, defaultValue="true", description="Archive release") protected boolean archiveRelease -
allowPasswordsInAllFields
@Property(required=false, description="Allows the usage of passwords in non-password fields. Passwords values are masked in the UI and logging output but are decrypted before the task execution.") protected boolean allowPasswordsInAllFields -
disableNotifications
@Property(required=false, description="Disable all notifications for this release.") protected boolean disableNotifications -
allowConcurrentReleasesFromTrigger
@Property(required=false, description="If set to false, a trigger can\'t create a release if the previous one it created is still running.") protected boolean allowConcurrentReleasesFromTrigger -
originTemplateId
@Property(required=false, description="The ID of the template that created this release.") protected String originTemplateId -
createdFromTrigger
@Property(required=false, description="True if release was created by a trigger.") protected boolean createdFromTrigger -
scriptUsername
@Property(required=false, description="The credentials of this user are used to run automated scripts in this release.") protected String scriptUsername -
scriptUserPassword
@Property(required=false, password=true, description="The password of the user that lends his credentials to run the scripts.") protected String scriptUserPassword -
extensions
@Property(required=false, asContainment=true, description="Extensions of this release, e.g. \'Release contents dashboard\'") protected List<ReleaseExtension> extensions -
startedFromTaskId
@Property(required=false, description="The Create Release task from which this release was created, if any") protected String startedFromTaskId -
autoStart
@Property(required=false, defaultValue="false", description="If true, the release will automatically start at scheduledStartDate.") protected boolean autoStart -
automatedResumeCount
-
maxAutomatedResumes
@Property(category="internal", hidden=true, defaultValue="50", description="The maximum number of automatic release resumes performed during phase restarts.") protected int maxAutomatedResumes -
riskProfile
@Property(required=false, description="Risk profile used in risk calculations") protected RiskProfile riskProfile -
author
-
logo
@Property(nested=true, required=false, description="The logo of the template") protected TemplateLogo logo
-
-
Constructor Details
-
Release
public Release()
-
-
Method Details
-
getPhases
-
setPhases
-
getReleaseTriggers
Deprecated. -
getReleaseTriggerById
Deprecated. -
setReleaseTriggers
Deprecated. -
deleteReleaseTriggerById
Deprecated. -
replaceTrigger
Deprecated. -
getRootReleaseId
-
setRootReleaseId
-
getParentReleaseId
-
setParentReleaseId
-
getMaxConcurrentReleases
public int getMaxConcurrentReleases() -
setMaxConcurrentReleases
public void setMaxConcurrentReleases(int maxConcurrentReleases) -
getCiUid
-
setCiUid
-
getAutomatedResumeCount
public int getAutomatedResumeCount() -
setAutomatedResumeCount
public void setAutomatedResumeCount(int automatedResumeCount) -
getMaxAutomatedResumes
public int getMaxAutomatedResumes() -
setMaxAutomatedResumes
public void setMaxAutomatedResumes(int maxAutomatedResumes) -
getAbortComment
-
getVariableValues
This method is kept for backwards compatibility.getVariables()method provides richer access to the variable management.- Returns:
- mapping from variable name to variable value containing only variables with string values.
Variable names are in
${key}format.
-
getPasswordVariableValues
This method is kept for backwards compatibility.getVariables()method provides richer access to the variable management.- Returns:
- mapping from variable name to variable value containing only variables with single password values.
Variable names are in
${key}format.
-
getCiPropertyVariables
-
getAllStringVariableValues
-
getAllVariableValuesAsStringsWithInterpolationInfo
-
getVariablesKeysInNonInterpolatableVariableValues
-
getVariablesByKeys
-
setVariableValues
This method is kept for backwards compatibility.setVariables(List)method provides richer access to the variable management.- Parameters:
variableValues- mapping from variable name to variable value containing only variables with string values. Variable names are in${key}orkeyformat.
-
setPasswordVariableValues
This method is kept for backwards compatibility.setVariables(List)method provides richer access to the variable management.- Parameters:
variableValues- mapping from password variable name to password variable value. Variable names are in${key}orkeyformat.
-
scanAndAddNewVariables
-
scanAndAddNewVariables
-
getAllVariables
- Specified by:
getAllVariablesin interfaceVariableContainer
-
getVariables
-
addVariables
-
replaceVariable
-
setVariables
-
getVariableById
-
addVariable
-
checkVariableCanBeAdded
-
getGlobalVariables
-
setGlobalVariables
-
getFolderVariables
-
setFolderVariables
-
removeVariable
-
isVariableUsed
-
getStatus
-
setStatus
-
getAdminTeam
-
getTeams
-
setTeams
-
getCategories
-
setCategories
-
getTags
-
setTags
-
getAttachments
-
setAttachments
-
deleteAttachment
-
getTasksUsingAttachment
-
hasBeenStarted
public boolean hasBeenStarted()- Specified by:
hasBeenStartedin classPlanItem
-
getReleaseAttachments
-
getCalendarLinkToken
-
setCalendarLinkToken
-
isCalendarPublished
public boolean isCalendarPublished() -
setCalendarPublished
public void setCalendarPublished(boolean calendarPublished) -
getExtensions
-
setExtensions
-
getRealFlagStatus
-
getCurrentPhase
-
getCurrentTask
-
hasCurrentPhase
public boolean hasCurrentPhase() -
start
-
start
-
startAsPartOfBulkOperation
-
resume
-
markTaskAsDone
-
startPendingTask
-
startWithInput
-
taskPreconditionValidated
-
failTask
-
failTask
-
failTask
-
abort
-
abortAsPartOfBulkOperation
-
retryTask
-
getNextPhase
-
hasNextPhase
-
addPhase
-
addPhase
-
deletePhase
-
getAllTasks
-
getTask
-
getAttachment
-
movePhase
-
getPhase
-
getPhase
-
hasPhase
-
addTeam
-
deleteTeam
-
addBelow
-
collectVariableReferences
-
collectVariableReferences
-
getAllGates
-
getAllUserInputTasks
-
getAllTasksOfType
-
findFirstSetDate
-
clearComments
public void clearComments() -
clearTaskModificationAttributes
public void clearTaskModificationAttributes() -
hasNoAutomatedTaskRunning
public boolean hasNoAutomatedTaskRunning() -
isDone
public boolean isDone() -
isPlannedOrActive
public boolean isPlannedOrActive() -
isActive
public boolean isActive() -
isDefunct
public boolean isDefunct() -
isUpdatable
public boolean isUpdatable()- Specified by:
isUpdatablein classPlanItem
-
isAborted
public boolean isAborted() -
isFailing
public boolean isFailing() -
isFailed
public boolean isFailed() -
isPaused
public boolean isPaused() -
isTemplate
public boolean isTemplate() -
isWorkflow
public boolean isWorkflow() -
isPlanned
public boolean isPlanned() -
isInProgress
public boolean isInProgress() -
isTutorial
public boolean isTutorial() -
setTutorial
public void setTutorial(boolean tutorial) -
isAbortOnFailure
public boolean isAbortOnFailure() -
setAbortOnFailure
public void setAbortOnFailure(boolean abortOnFailure) -
isArchiveRelease
public boolean isArchiveRelease() -
setArchiveRelease
public void setArchiveRelease(boolean archiveRelease) -
isAllowPasswordsInAllFields
public boolean isAllowPasswordsInAllFields() -
setAllowPasswordsInAllFields
public void setAllowPasswordsInAllFields(boolean allowPasswordsInAllFields) -
isDisableNotifications
public boolean isDisableNotifications() -
setDisableNotifications
public void setDisableNotifications(boolean disableNotifications) -
isAllowConcurrentReleasesFromTrigger
public boolean isAllowConcurrentReleasesFromTrigger() -
setAllowConcurrentReleasesFromTrigger
public void setAllowConcurrentReleasesFromTrigger(boolean allowConcurrentReleasesFromTrigger) -
getOriginTemplateId
-
setOriginTemplateId
-
isCreatedFromTrigger
public boolean isCreatedFromTrigger() -
setCreatedFromTrigger
public void setCreatedFromTrigger(boolean createdFromTrigger) -
getRelease
- Specified by:
getReleasein classPlanItem
-
getReleaseUid
- Specified by:
getReleaseUidin classPlanItem
-
setReleaseUid
- Specified by:
setReleaseUidin classPlanItem
-
getDisplayPath
- Specified by:
getDisplayPathin classPlanItem
-
getTeamWithId
-
getChildren
- Specified by:
getChildrenin classPlanItem
-
getAllPlanItems
-
toString
- Overrides:
toStringin classBaseConfigurationItem
-
checkDatesValidityForRelease
public void checkDatesValidityForRelease() -
checkDatesValidityForTemplate
public void checkDatesValidityForTemplate() -
checkDatesValidity
public void checkDatesValidity() -
updateDatesForRelease
-
updateDatesForTemplate
-
getQueryableStartDate
-
setQueryableStartDate
-
getQueryableEndDate
-
setQueryableEndDate
-
getScriptUsername
-
setScriptUsername
-
getScriptUserPassword
-
setScriptUserPassword
-
getUrl
-
getVariableMapping
-
setVariableMapping
-
getRiskProfile
-
setRiskProfile
-
getStartedFromTaskId
-
setStartedFromTaskId
-
setStartDate
- Overrides:
setStartDatein classPlanItem
-
setScheduledStartDate
- Overrides:
setScheduledStartDatein classPlanItem
-
setEndDate
- Overrides:
setEndDatein classPlanItem
-
setDueDate
- Overrides:
setDueDatein classPlanItem
-
getKind
-
setKind
-
getAuthor
-
setAuthor
-
getLogo
-
setLogo
-
getDefaultTargetFolderId
-
setDefaultTargetFolderId
-
getAllowTargetFolderOverride
public boolean getAllowTargetFolderOverride() -
setAllowTargetFolderOverride
public void setAllowTargetFolderOverride(boolean allowTargetFolderOverride) -
updateTeam
-
updateRealFlagStatus
public void updateRealFlagStatus() -
hasScriptUsername
public boolean hasScriptUsername() -
getActiveTasks
-
isArchived
public boolean isArchived() -
setArchived
public void setArchived(boolean isArchived) -
accept
- Specified by:
acceptin interfaceVisitableItem
-
getVariableUsages
- Specified by:
getVariableUsagesin classPlanItem
-
get$metadata
- Specified by:
get$metadatain interfaceCiWithInternalMetadata
-
getFolderId
-
findFolderId
-
hasTeam
-
getTeamsOf
-
getPermissions
-
getPermissions
public Set<String> getPermissions(Collection<String> principals, List<com.xebialabs.deployit.security.Role> userRoles) -
isAutoStart
public boolean isAutoStart() -
setAutoStart
public void setAutoStart(boolean autoStart) -
canAutomaticallyStartReleaseNow
public boolean canAutomaticallyStartReleaseNow() -
canScheduleReleaseStart
public boolean canScheduleReleaseStart() -
isPending
public boolean isPending() -
deleteTask
-
replaceTask
-
getPhasesByTitle
-
getPhasesContainingInTitle
-
filterPhasesContainingInTitle
-
getTasksByTitle
-
restorePhases
-
fixId
-
createCiAttributes
public void createCiAttributes() -
updateCiAttributes
public void updateCiAttributes()
-