Interface SpaceRetentionPolicyService

  • All Known Implementing Classes:
    DefaultSpaceRetentionPolicyService

    @Internal
    public interface SpaceRetentionPolicyService
    Service for interacting with the SpaceRetentionPolicy settings
    Since:
    7.14.0
    • 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 policy
        PermissionException - 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 saved
        newPolicy - new retention policy
        Throws:
        NotFoundException - if specified space cannot be found
        PermissionException - 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.