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 boolean
protected boolean
protected boolean
protected boolean
protected String
protected int
protected boolean
protected String
protected boolean
protected boolean
static final String
protected boolean
protected List<ReleaseExtension>
protected ReleaseKind
protected TemplateLogo
protected int
protected String
protected Date
protected Date
protected FlagStatus
protected List<ReleaseTrigger>
Deprecated.protected RiskProfile
static final String
protected String
protected String
protected String
protected ReleaseStatus
The Digital.ai Release teams are transient CIs and are kept for backwards-compatibility.protected boolean
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
Fields inherited from interface com.xebialabs.deployit.repository.core.Securable
SECURITY_PERMISSIONS_PROPERTY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabortAsPartOfBulkOperation
(String abortComment) void
accept
(ReleaseVisitor visitor) void
void
void
void
addVariable
(Variable variable) void
addVariables
(List<Variable> newVariables) boolean
boolean
void
void
void
void
checkVariableCanBeAdded
(Variable variable) void
void
collectVariableReferences
(VisitableItem updated) void
void
deleteAttachment
(String attachmentId) void
deletePhase
(Phase phase) void
deleteReleaseTriggerById
(String triggerId) Deprecated.void
deleteTask
(Task task) void
deleteTeam
(String teamId) filterPhasesContainingInTitle
(List<Phase> phases, String partialTitleToLookFor) void
boolean
<T> List<T>
getAllTasksOfType
(Class<T> clazz) getAttachment
(String attachmentId) int
getCiUid()
getKind()
getLogo()
int
int
getNextPhase
(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.boolean
boolean
boolean
hasNextPhase
(Phase phase) boolean
boolean
boolean
boolean
boolean
boolean
boolean
isActive()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isDone()
boolean
isFailed()
boolean
boolean
boolean
isPaused()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isVariableUsed
(Variable variable) boolean
markTaskAsDone
(String taskId, TaskStatus status) removeVariable
(String variableId) void
replaceTask
(Task task) void
replaceTrigger
(ReleaseTrigger releaseTrigger) Deprecated.void
replaceVariable
(Variable current, Variable replacement) restorePhases
(List<Phase> phases) resume()
scanAndAddNewVariables
(VisitableItem updated) void
setAbortOnFailure
(boolean abortOnFailure) void
setAllowConcurrentReleasesFromTrigger
(boolean allowConcurrentReleasesFromTrigger) void
setAllowPasswordsInAllFields
(boolean allowPasswordsInAllFields) void
setAllowTargetFolderOverride
(boolean allowTargetFolderOverride) void
setArchived
(boolean isArchived) void
setArchiveRelease
(boolean archiveRelease) void
setAttachments
(List<Attachment> attachments) void
void
setAutomatedResumeCount
(int automatedResumeCount) void
setAutoStart
(boolean autoStart) void
setCalendarLinkToken
(String calendarLinkToken) void
setCalendarPublished
(boolean calendarPublished) void
setCategories
(Set<String> categories) void
void
setCreatedFromTrigger
(boolean createdFromTrigger) void
setDefaultTargetFolderId
(String defaultTargetFolderId) void
setDisableNotifications
(boolean disableNotifications) void
setDueDate
(Date value) void
setEndDate
(Date value) void
setExtensions
(List<ReleaseExtension> extensions) void
setFolderVariables
(FolderVariables folderVariables) void
setGlobalVariables
(GlobalVariables globalVariables) void
setKind
(ReleaseKind kind) void
setLogo
(TemplateLogo logo) void
setMaxAutomatedResumes
(int maxAutomatedResumes) void
setMaxConcurrentReleases
(int maxConcurrentReleases) void
setOriginTemplateId
(String originTemplateId) void
setParentReleaseId
(String parentReleaseId) void
setPasswordVariableValues
(Map<String, ?> variableValues) This method is kept for backwards compatibility.void
void
setQueryableEndDate
(Date queryableEndDate) void
setQueryableStartDate
(Date queryableStartDate) void
setReleaseTriggers
(List<ReleaseTrigger> releaseTriggers) Deprecated.void
setReleaseUid
(Integer releaseUid) void
setRiskProfile
(RiskProfile riskProfile) void
setRootReleaseId
(String rootReleaseId) void
setScheduledStartDate
(Date scheduledStartDate) void
setScriptUsername
(String scriptUsername) void
setScriptUserPassword
(String scriptUserPassword) void
setStartDate
(Date value) void
setStartedFromTaskId
(String startedFromTaskId) void
setStatus
(ReleaseStatus value) void
void
void
setTutorial
(boolean tutorial) void
setVariableMapping
(Map<String, String> variableMapping) void
setVariables
(List<Variable> variables) void
setVariableValues
(Map<String, ?> variableValues) This method is kept for backwards compatibility.start()
start
(boolean releaseStartedImmediatelyAfterBeingCreated) startPendingTask
(String taskId) startWithInput
(String taskId) taskPreconditionValidated
(String taskId) toString()
void
void
updateDatesForRelease
(Date scheduledStartDate, Date dueDate, Integer plannedDuration) void
updateDatesForTemplate
(Date scheduledStartDate, Date dueDate, Integer plannedDuration) void
void
updateTeam
(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, 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
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
-
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}
orkey
format.
-
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}
orkey
format.
-
scanAndAddNewVariables
-
scanAndAddNewVariables
-
getAllVariables
- Specified by:
getAllVariables
in 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:
hasBeenStarted
in 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:
isUpdatable
in 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:
getRelease
in classPlanItem
-
getReleaseUid
- Specified by:
getReleaseUid
in classPlanItem
-
setReleaseUid
- Specified by:
setReleaseUid
in classPlanItem
-
getDisplayPath
- Specified by:
getDisplayPath
in classPlanItem
-
getTeamWithId
-
getChildren
- Specified by:
getChildren
in classPlanItem
-
getAllPlanItems
-
toString
- Overrides:
toString
in 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:
setStartDate
in classPlanItem
-
setScheduledStartDate
- Overrides:
setScheduledStartDate
in classPlanItem
-
setEndDate
- Overrides:
setEndDate
in classPlanItem
-
setDueDate
- Overrides:
setDueDate
in 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:
accept
in interfaceVisitableItem
-
getVariableUsages
- Specified by:
getVariableUsages
in classPlanItem
-
get$metadata
- Specified by:
get$metadata
in interfaceCiWithInternalMetadata
-
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()
-