@Transactional public class DefaultSpaceRetentionPolicyService extends Object implements SpaceRetentionPolicyService
| Constructor and Description |
|---|
DefaultSpaceRetentionPolicyService(SpaceRetentionPolicyManager spaceRetentionPolicyManager,
SpaceManagerInternal spaceManagerInternal,
RetentionPolicyPermissionManager retentionPolicyPermissionManager,
RetentionFeatureChecker featureChecker) |
| Modifier and Type | Method and Description |
|---|---|
void |
deletePolicy(String spaceKey)
Delete a space retention policy.
|
Optional<SpaceRetentionPolicy> |
getPolicy(long spaceId) |
Optional<SpaceRetentionPolicy> |
getPolicy(String spaceKey) |
void |
savePolicy(String spaceKey,
SpaceRetentionPolicy newPolicy)
Save or update retention policy for a space
|
public DefaultSpaceRetentionPolicyService(SpaceRetentionPolicyManager spaceRetentionPolicyManager, SpaceManagerInternal spaceManagerInternal, RetentionPolicyPermissionManager retentionPolicyPermissionManager, RetentionFeatureChecker featureChecker)
public void deletePolicy(String spaceKey) throws NotFoundException, PermissionException
SpaceRetentionPolicyServicedeletePolicy in interface SpaceRetentionPolicyServicespaceKey - key of the space whose retention policy must be deletedNotFoundException - if specified space does not currently have any retention policyPermissionException - if current user does not have permission to edit global retention policypublic void savePolicy(String spaceKey, SpaceRetentionPolicy newPolicy) throws NotFoundException, PermissionException
SpaceRetentionPolicyServicesavePolicy in interface SpaceRetentionPolicyServicespaceKey - key of the space whose retention policy must be savednewPolicy - new retention policyNotFoundException - if specified space cannot be foundPermissionException - if current user does not have permission to edit global retention policy@Transactional(readOnly=true) public Optional<SpaceRetentionPolicy> getPolicy(String spaceKey)
getPolicy in interface SpaceRetentionPolicyService@Transactional(readOnly=true) public Optional<SpaceRetentionPolicy> getPolicy(long spaceId)
getPolicy in interface SpaceRetentionPolicyServiceCopyright © 2003–2022 Atlassian. All rights reserved.