Interface SpaceRetentionPolicyService
-
- All Known Implementing Classes:
DefaultSpaceRetentionPolicyService
@Internal public interface SpaceRetentionPolicyService
Service for interacting with the SpaceRetentionPolicy settings- Since:
- 7.14.0
-
-
Method Summary
All Methods Instance Methods Abstract 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
-
-
-
Method Detail
-
deletePolicy
void deletePolicy(String spaceKey)
Delete a space retention policy.- 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
void savePolicy(String spaceKey, SpaceRetentionPolicy newPolicy)
Save or update retention policy for a space- 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
Optional<SpaceRetentionPolicy> getPolicy(String spaceKey)
- Returns:
- retention policy of a space, if there is one and current user has permission to view it.
-
getPolicy
Optional<SpaceRetentionPolicy> getPolicy(long spaceId)
- Returns:
- retention policy of a space, if there is one and current user has permission to view it.
-
-