Package org.craftercms.deployer.api
Class Deployment
java.lang.Object
org.craftercms.deployer.api.Deployment
Represents a deployment. Contains every important status information of a particular deployment execution.
- Author:
- avasquez
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected ChangeSet
protected ZonedDateTime
protected Lock
protected Deployment.Mode
protected List<ProcessorExecution>
protected ZonedDateTime
protected Deployment.Status
protected Target
-
Constructor Summary
ConstructorDescriptionDeployment
(Target target) Deployment
(Target target, Map<String, Object> params) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a param that can be used by processors during the deployment.void
Adds aProcessorExecution
to the list.void
end
(Deployment.Status status) Ends the deployment with the specified status.Returns the change set of the deployment.Returns the duration of the deployment.getEnd()
Returns the end date of the deployment.getMode()
Returns a param that can be used by processors during the deployment.Returns the list ofProcessorExecution
s.getStart()
Returns the start date of the deployment.Returns the status of the deployment, either success or failure.Returns theTarget
being deployed.boolean
Returns true if the change set is null or empty.boolean
Returns true if the deployment is still running.void
removeParam
(String name) Removes the specified paramvoid
setChangeSet
(ChangeSet changeSet) Sets the change set of the deployment.void
start()
Starts the deployment.toString()
-
Field Details
-
target
-
start
-
end
-
status
-
changeSet
-
processorExecutions
-
params
-
lock
-
mode
-
-
Constructor Details
-
Deployment
-
Deployment
-
-
Method Details
-
getTarget
Returns theTarget
being deployed. -
getStart
Returns the start date of the deployment. -
getEnd
Returns the end date of the deployment. -
isRunning
public boolean isRunning()Returns true if the deployment is still running. -
getDuration
Returns the duration of the deployment. -
getStatus
Returns the status of the deployment, either success or failure. -
getMode
-
getChangeSet
Returns the change set of the deployment. -
setChangeSet
Sets the change set of the deployment. -
isChangeSetEmpty
public boolean isChangeSetEmpty()Returns true if the change set is null or empty. -
start
public void start()Starts the deployment. -
end
Ends the deployment with the specified status. -
getProcessorExecutions
Returns the list ofProcessorExecution
s. -
addProcessorExecution
Adds aProcessorExecution
to the list. -
addParam
Adds a param that can be used by processors during the deployment.- Parameters:
name
- the name of the paramvalue
- the value of the param
-
getParam
Returns a param that can be used by processors during the deployment.- Parameters:
name
- the name of the param- Returns:
- the value of the param
-
removeParam
Removes the specified param- Parameters:
name
- the name of the param
-
toString
-