Class DeploymentResultDeletionServiceImpl
java.lang.Object
com.atlassian.bamboo.deployments.results.service.DeploymentResultDeletionServiceImpl
- All Implemented Interfaces:
DeploymentResultDeletionService
public class DeploymentResultDeletionServiceImpl
extends Object
implements DeploymentResultDeletionService
-
Constructor Summary
ConstructorDescriptionDeploymentResultDeletionServiceImpl
(BambooTransactionHibernateTemplate bambooTransactionHibernateTemplate, DeploymentResultDao deploymentResultDao, EnvironmentDao environmentDao, VariableContextBaselineDao variableContextBaselineDao, com.atlassian.event.api.EventPublisher eventPublisher) -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete
(long deploymentResultId) Affected tables: - DEPLOYMENT_RESULT (manual, Hibernate) - DEPLOYMENT_RESULT_CUSTOMDATA (cascade) - DEPLOYMENT_VARIABLE_SUBS (manual, JDBC query) - WEBHOOK_RESPONSE (manual, Hibernate)int
deleteForEnvironment
(long environmentId) Delete batch of Deployment Results and related records.void
removeLogs
(long deploymentResultId, long maxAllowedLogSize) Affected filesystem: - $BAMBOO_HOME/xml-data/builds/{environment.key}/download-data/build_logs/{deploymentResult.key}.logint
unlinkFromVersion
(long deploymentVersionId) Unlink Deployment Results from Deployment Version.int
unlinkFromVersionForProject
(long deploymentProjectId) Unlink Deployment Results from Deployment Versions for all Versions in DeploymentProject.
-
Constructor Details
-
DeploymentResultDeletionServiceImpl
public DeploymentResultDeletionServiceImpl(BambooTransactionHibernateTemplate bambooTransactionHibernateTemplate, DeploymentResultDao deploymentResultDao, EnvironmentDao environmentDao, VariableContextBaselineDao variableContextBaselineDao, com.atlassian.event.api.EventPublisher eventPublisher)
-
-
Method Details
-
delete
public void delete(long deploymentResultId) Affected tables: - DEPLOYMENT_RESULT (manual, Hibernate) - DEPLOYMENT_RESULT_CUSTOMDATA (cascade) - DEPLOYMENT_VARIABLE_SUBS (manual, JDBC query) - WEBHOOK_RESPONSE (manual, Hibernate)Affected filesystem: - $BAMBOO_HOME/xml-data/builds/{environment.key}/download-data/build_logs/{deploymentResult.key}.log
- Specified by:
delete
in interfaceDeploymentResultDeletionService
- Parameters:
deploymentResultId
- id of Deployment Result to delete
-
deleteForEnvironment
public int deleteForEnvironment(long environmentId) Description copied from interface:DeploymentResultDeletionService
Delete batch of Deployment Results and related records.- Specified by:
deleteForEnvironment
in interfaceDeploymentResultDeletionService
- Parameters:
environmentId
- id of Environment which DeploymentResults are to be deleted
-
unlinkFromVersion
public int unlinkFromVersion(long deploymentVersionId) Description copied from interface:DeploymentResultDeletionService
Unlink Deployment Results from Deployment Version.- Specified by:
unlinkFromVersion
in interfaceDeploymentResultDeletionService
- Parameters:
deploymentVersionId
- id of DeploymentVersion which DeploymentRecords should be unlinked from
-
unlinkFromVersionForProject
public int unlinkFromVersionForProject(long deploymentProjectId) Description copied from interface:DeploymentResultDeletionService
Unlink Deployment Results from Deployment Versions for all Versions in DeploymentProject.- Specified by:
unlinkFromVersionForProject
in interfaceDeploymentResultDeletionService
- Parameters:
deploymentProjectId
- id of DeploymentProject
-
removeLogs
public void removeLogs(long deploymentResultId, long maxAllowedLogSize) Affected filesystem: - $BAMBOO_HOME/xml-data/builds/{environment.key}/download-data/build_logs/{deploymentResult.key}.log- Specified by:
removeLogs
in interfaceDeploymentResultDeletionService
- Parameters:
deploymentResultId
- id of Deployment ResultmaxAllowedLogSize
- delete only files longer than allowed size, when -1 then delete all files
-