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
ConstructorDescriptionDefaultSpaceRetentionPolicyService
(SpaceRetentionPolicyManager spaceRetentionPolicyManager, SpaceManagerInternal spaceManagerInternal, RetentionPolicyPermissionManager retentionPolicyPermissionManager, RetentionFeatureChecker featureChecker) -
Method Summary
Modifier and TypeMethodDescriptionvoid
deletePolicy
(String spaceKey) Delete a space retention policy.getPolicy
(long spaceId) void
savePolicy
(String spaceKey, SpaceRetentionPolicy newPolicy) Save or update retention policy for a space
-
Constructor Details
-
DefaultSpaceRetentionPolicyService
public DefaultSpaceRetentionPolicyService(SpaceRetentionPolicyManager spaceRetentionPolicyManager, SpaceManagerInternal spaceManagerInternal, RetentionPolicyPermissionManager retentionPolicyPermissionManager, RetentionFeatureChecker featureChecker)
-
-
Method Details
-
deletePolicy
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
- Specified by:
getPolicy
in interfaceSpaceRetentionPolicyService
- Returns:
- retention policy of a space, if there is one and current user has permission to view it.
-
getPolicy
- Specified by:
getPolicy
in interfaceSpaceRetentionPolicyService
- Returns:
- retention policy of a space, if there is one and current user has permission to view it.
-