Class DefaultSpaceRetentionPolicyService
- java.lang.Object
-
- com.atlassian.confluence.impl.retention.service.DefaultSpaceRetentionPolicyService
-
- All Implemented Interfaces:
SpaceRetentionPolicyService
@Transactional public class DefaultSpaceRetentionPolicyService extends Object implements SpaceRetentionPolicyService
Default service for interacting with the SpaceRetentionPolicy settings.- Since:
- 7.14
-
-
Constructor Summary
Constructors Constructor Description DefaultSpaceRetentionPolicyService(SpaceRetentionPolicyManager spaceRetentionPolicyManager, SpaceManagerInternal spaceManagerInternal, RetentionPolicyPermissionManager retentionPolicyPermissionManager, RetentionFeatureChecker featureChecker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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
-
-
-
Constructor Detail
-
DefaultSpaceRetentionPolicyService
public DefaultSpaceRetentionPolicyService(SpaceRetentionPolicyManager spaceRetentionPolicyManager, SpaceManagerInternal spaceManagerInternal, RetentionPolicyPermissionManager retentionPolicyPermissionManager, RetentionFeatureChecker featureChecker)
-
-
Method Detail
-
deletePolicy
public void deletePolicy(String spaceKey) throws NotFoundException, PermissionException
Description copied from interface:SpaceRetentionPolicyService
Delete a space retention policy.- Specified by:
deletePolicy
in interfaceSpaceRetentionPolicyService
- Parameters:
spaceKey
- key of the space whose retention policy must be deleted- Throws:
NotFoundException
- if specified space does not currently have any retention policyPermissionException
- if current user does not have permission to edit global retention policy
-
savePolicy
public void savePolicy(String spaceKey, SpaceRetentionPolicy newPolicy) throws NotFoundException, PermissionException
Description copied from interface:SpaceRetentionPolicyService
Save or update retention policy for a space- Specified by:
savePolicy
in interfaceSpaceRetentionPolicyService
- Parameters:
spaceKey
- key of the space whose retention policy must be savednewPolicy
- new retention policy- Throws:
NotFoundException
- if specified space cannot be foundPermissionException
- if current user does not have permission to edit global retention policy
-
getPolicy
@Transactional(readOnly=true) public Optional<SpaceRetentionPolicy> getPolicy(String spaceKey)
- Specified by:
getPolicy
in interfaceSpaceRetentionPolicyService
- Returns:
- retention policy of a space, if there is one and current user has permission to view it.
-
getPolicy
@Transactional(readOnly=true) public Optional<SpaceRetentionPolicy> getPolicy(long spaceId)
- Specified by:
getPolicy
in interfaceSpaceRetentionPolicyService
- Returns:
- retention policy of a space, if there is one and current user has permission to view it.
-
-