|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.deployments.results.service.DeploymentResultServiceImpl
public class DeploymentResultServiceImpl
Constructor Summary | |
---|---|
DeploymentResultServiceImpl(DeploymentResultDao deploymentResultDao,
DeploymentVersionDao deploymentVersionDao,
EnvironmentDao environmentDao,
EnvironmentService environmentService,
DeploymentVersionService deploymentVersionService,
VariableContextBaselineDao variableContextBaselineDao,
DeploymentVariableSubstitutionDao deploymentVariableSubstitutionDao,
DeploymentsInProgressService deploymentsInProgressService)
|
Method Summary | |
---|---|
int |
countDeploymentResultsForEnvironment(long environmentId)
Count deployment results for deployment. |
DeploymentResult |
createDeploymentResult(long environmentId,
long deploymentVersionId,
VariableContext variableContext,
TriggerReason triggerReason)
|
Set<Long> |
findEnvironmentIdsVersionWasDeployedOn(long deploymentVersionId)
|
DeploymentResult |
getDeploymentResult(long deploymentResultId)
Retrieve a specific deployment result. |
List<DeploymentResult> |
getDeploymentResultsByLifeCycleState(Collection<LifeCycleState> lifeCycleStates)
|
List<DeploymentResult> |
getDeploymentResultsForDeploymentVersion(long deploymentVersionId)
Get all deployment results for deployment version. |
List<DeploymentResult> |
getDeploymentResultsForDeploymentVersionAndEnvironment(long deploymentVersionId,
long environmentId)
Get all deployment results for deployment versions that ran against the specified environment. |
List<DeploymentResult> |
getDeploymentResultsForDeploymentVersionFinishedBefore(long deploymentVersionId,
Date finishDate)
Get all deployment results for deployment version finished before given date. |
List<DeploymentResult> |
getDeploymentResultsForEnvironment(long environmentId)
Get all deployment results for environment. |
List<DeploymentResult> |
getDeploymentResultsForEnvironment(long environmentId,
int offset,
int maxResults)
Get deployment results for environment. |
DeploymentResult |
getLastResultBefore(DeploymentResult deploymentResult)
|
DeploymentResult |
getLastResultInStatesBefore(DeploymentResult deploymentResult,
EnumSet<BuildState> buildStates)
|
DeploymentResult |
getLatestDeploymentResult(long environmentId,
long deploymentVersionId)
Retrieve a specific deployment result for an environment and version. |
DeploymentResult |
getLatestDeploymentResultForEnvironment(long environmentId)
Get the latest result that ran against an environment |
List<EnvironmentStatus> |
getLatestKnownDeploymentResultForEnvironments(Iterable<? extends Environment> environments)
Get the latest results that *actually* ran against a list of environments. |
List<DeploymentResult> |
getResultsWhereDeploymentVersionIsDeployedNow(List<Long> environmentsId,
long deploymentVersionId)
|
DeploymentVersion |
getRollbackVersion(DeploymentResult deploymentResult)
For a given deployment result find the version that existed on the environment before that deployment. |
DeploymentVersion |
getRollbackVersion(long environmentId)
For a given environment find the version that existed on the environment prior to the last deployment. |
List<DeploymentResult> |
getSuccessfulDeploymentResultsForEnvironment(long environmentId,
int offset,
int maxResults)
Get successful deployment results for environment. |
void |
logSubstitutedVariables(long deploymentResultId,
Map<String,VariableSubstitutionContext> substitutions)
Adds variable substitution result to DeploymentResult This method logs substitution after it was
performed and will use only REALLY substituted values |
void |
setExecutingAgent(long deploymentResultId,
long agentId)
Set the agent that the deployment is executing on. |
void |
updateDeploymentState(long deploymentResultId,
BuildState deploymentState,
Map<String,String> customData)
Update the build state of the Deployment Result |
void |
updateLifeCycleState(DeploymentTimingPoint timingPoint,
LifeCycleState lifeCycleState)
Update lifecycle state of the DeploymentResult |
void |
updateLifeCycleState(long deploymentResultId,
LifeCycleState lifeCycleState)
Update lifecycle state of the DeploymentResult. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DeploymentResultServiceImpl(DeploymentResultDao deploymentResultDao, DeploymentVersionDao deploymentVersionDao, EnvironmentDao environmentDao, EnvironmentService environmentService, DeploymentVersionService deploymentVersionService, @NotNull VariableContextBaselineDao variableContextBaselineDao, @NotNull DeploymentVariableSubstitutionDao deploymentVariableSubstitutionDao, @NotNull DeploymentsInProgressService deploymentsInProgressService)
Method Detail |
---|
public DeploymentResult createDeploymentResult(long environmentId, long deploymentVersionId, @NotNull VariableContext variableContext, @NotNull TriggerReason triggerReason)
createDeploymentResult
in interface DeploymentResultService
@Nullable public DeploymentResult getDeploymentResult(long deploymentResultId)
DeploymentResultService
getDeploymentResult
in interface DeploymentResultService
deploymentResultId
- of the result
@Nullable public DeploymentResult getLatestDeploymentResult(long environmentId, long deploymentVersionId)
DeploymentResultService
getLatestDeploymentResult
in interface DeploymentResultService
environmentId
- of the environmentdeploymentVersionId
- of the version
@Nullable public DeploymentResult getLatestDeploymentResultForEnvironment(long environmentId)
DeploymentResultService
getLatestDeploymentResultForEnvironment
in interface DeploymentResultService
environmentId
- id of the environment
@NotNull public List<EnvironmentStatus> getLatestKnownDeploymentResultForEnvironments(Iterable<? extends Environment> environments)
DeploymentResultService
getLatestKnownDeploymentResultForEnvironments
in interface DeploymentResultService
environments
- we want to retrieve latest DeploymentResult
@NotNull public List<DeploymentResult> getDeploymentResultsForEnvironment(long environmentId)
DeploymentResultService
getDeploymentResultsForEnvironment
in interface DeploymentResultService
environmentId
- id of environment to get results from
@NotNull public List<DeploymentResult> getDeploymentResultsForEnvironment(long environmentId, int offset, int maxResults)
DeploymentResultService
getDeploymentResultsForEnvironment
in interface DeploymentResultService
environmentId
- id of environment to get results from
@NotNull public List<DeploymentResult> getSuccessfulDeploymentResultsForEnvironment(long environmentId, int offset, int maxResults)
DeploymentResultService
getSuccessfulDeploymentResultsForEnvironment
in interface DeploymentResultService
environmentId
- id of environment to get results from
@NotNull public List<DeploymentResult> getDeploymentResultsForDeploymentVersion(long deploymentVersionId)
DeploymentResultService
getDeploymentResultsForDeploymentVersion
in interface DeploymentResultService
deploymentVersionId
- id of deployment version to get results from
@NotNull public List<DeploymentResult> getDeploymentResultsForDeploymentVersionAndEnvironment(long deploymentVersionId, long environmentId)
DeploymentResultService
getDeploymentResultsForDeploymentVersionAndEnvironment
in interface DeploymentResultService
deploymentVersionId
- id of deployment versionenvironmentId
- id of environment
@NotNull public List<DeploymentResult> getDeploymentResultsForDeploymentVersionFinishedBefore(long deploymentVersionId, Date finishDate)
DeploymentResultService
getDeploymentResultsForDeploymentVersionFinishedBefore
in interface DeploymentResultService
deploymentVersionId
- id of deployment version to get results fromfinishDate
- only select results finished before this date
public int countDeploymentResultsForEnvironment(long environmentId)
DeploymentResultService
countDeploymentResultsForEnvironment
in interface DeploymentResultService
@NotNull public List<DeploymentResult> getDeploymentResultsByLifeCycleState(Collection<LifeCycleState> lifeCycleStates)
getDeploymentResultsByLifeCycleState
in interface DeploymentResultService
public DeploymentVersion getRollbackVersion(long environmentId)
DeploymentResultService
getRollbackVersion
in interface DeploymentResultService
environmentId
- to find rollback version for.
@Nullable public DeploymentVersion getRollbackVersion(@NotNull DeploymentResult deploymentResult)
DeploymentResultService
getRollbackVersion
in interface DeploymentResultService
deploymentResult
- deployment result that was deployed at some time on some environment
public void updateDeploymentState(long deploymentResultId, @NotNull BuildState deploymentState, Map<String,String> customData)
DeploymentResultService
updateDeploymentState
in interface DeploymentResultService
deploymentResultId
- if of result to updatedeploymentState
- new value of the build state to savepublic void updateLifeCycleState(long deploymentResultId, @NotNull LifeCycleState lifeCycleState)
DeploymentResultService
updateLifeCycleState
in interface DeploymentResultService
deploymentResultId
- id of DeploymentResultlifeCycleState
- lifecycle state to be setpublic void updateLifeCycleState(@NotNull DeploymentTimingPoint timingPoint, @NotNull LifeCycleState lifeCycleState)
DeploymentResultService
updateLifeCycleState
in interface DeploymentResultService
timingPoint
- deployment timing pointlifeCycleState
- lifecycle state to be setpublic void logSubstitutedVariables(long deploymentResultId, Map<String,VariableSubstitutionContext> substitutions)
DeploymentResultService
DeploymentResult
This method logs substitution after it was
performed and will use only REALLY substituted values
logSubstitutedVariables
in interface DeploymentResultService
public void setExecutingAgent(long deploymentResultId, long agentId)
DeploymentResultService
setExecutingAgent
in interface DeploymentResultService
deploymentResultId
- id of the deployment resultagentId
- if of the agent@NotNull public Set<Long> findEnvironmentIdsVersionWasDeployedOn(long deploymentVersionId)
findEnvironmentIdsVersionWasDeployedOn
in interface DeploymentResultService
public DeploymentResult getLastResultBefore(@NotNull DeploymentResult deploymentResult)
getLastResultBefore
in interface DeploymentResultService
public DeploymentResult getLastResultInStatesBefore(@NotNull DeploymentResult deploymentResult, @NotNull EnumSet<BuildState> buildStates)
getLastResultInStatesBefore
in interface DeploymentResultService
public List<DeploymentResult> getResultsWhereDeploymentVersionIsDeployedNow(List<Long> environmentsId, long deploymentVersionId)
getResultsWhereDeploymentVersionIsDeployedNow
in interface DeploymentResultService
environmentsId
- list of environments to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |