Class CachingSpaceRetentionPolicyManager
- java.lang.Object
-
- com.atlassian.confluence.impl.retention.manager.CachingSpaceRetentionPolicyManager
-
- All Implemented Interfaces:
SpaceRetentionPolicyManager
public class CachingSpaceRetentionPolicyManager extends Object implements SpaceRetentionPolicyManager
Caching space retention policies by space keys. Looking up by space Ids is only used by VersionalRemovalService, which has its own cache.- Since:
- 7.14.0
-
-
Constructor Summary
Constructors Constructor Description CachingSpaceRetentionPolicyManager(SpaceRetentionPolicyManager delegate, TransactionAwareCacheFactory cacheFactory)
-
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
-
CachingSpaceRetentionPolicyManager
public CachingSpaceRetentionPolicyManager(SpaceRetentionPolicyManager delegate, TransactionAwareCacheFactory cacheFactory)
-
-
Method Detail
-
deletePolicy
public void deletePolicy(String spaceKey)
Description copied from interface:SpaceRetentionPolicyManager
Delete a space retention policy.- Specified by:
deletePolicy
in interfaceSpaceRetentionPolicyManager
- Parameters:
spaceKey
- key of the space whose retention policy must be deleted
-
savePolicy
public void savePolicy(String spaceKey, SpaceRetentionPolicy newPolicy)
Description copied from interface:SpaceRetentionPolicyManager
Save or update retention policy for a space- Specified by:
savePolicy
in interfaceSpaceRetentionPolicyManager
- Parameters:
spaceKey
- key of the space whose retention policy must be savednewPolicy
- new retention policy
-
getPolicy
public Optional<SpaceRetentionPolicy> getPolicy(String spaceKey)
- Specified by:
getPolicy
in interfaceSpaceRetentionPolicyManager
- Returns:
- retention policy of a space, if any.
-
getPolicy
public Optional<SpaceRetentionPolicy> getPolicy(long spaceId)
- Specified by:
getPolicy
in interfaceSpaceRetentionPolicyManager
- Returns:
- retention policy of a space, if any.
-
-