Interface SpacePermissionOperationKeyConverter

All Known Implementing Classes:
DefaultGlobalPermissionOperationKeyConverter, DefaultSpacePermissionOperationKeyConverter

public interface SpacePermissionOperationKeyConverter
Converts between confluences SpacePermission type and an OperationDescription
Since:
9.1.0
  • Method Details

    • toOperation

      OperationDescription toOperation(String spacePermission)
      Converts the space permission type into an OperationDescription

      It first checks the set of built-in SpacePermissions for a mapping from Permission type to OperationDescription

      Parameters:
      spacePermission - the permission to convert see com.atlassian.confluence.security.SpacePermission#getType
      Returns:
      an OperationDescription if it is a valid space permission and can be converted
      Throws:
      IllegalArgumentException - if the space permission is not a built-in type or matches the custom content pattern
    • toPermissionType

      String toPermissionType(OperationDescription operation)
      Converts the OperationDescription into a SpacePermission.type
      Parameters:
      operation - the operation to convert
      Returns:
      a type suitable for storing in the database