Interface SpacePermissionOperationKeyConverter
- All Known Implementing Classes:
DefaultGlobalPermissionOperationKeyConverter,DefaultSpacePermissionOperationKeyConverter
public interface SpacePermissionOperationKeyConverter
Converts between confluences SpacePermission type and an
OperationDescription- Since:
- 9.1.0
-
Method Summary
Modifier and TypeMethodDescriptiontoOperation(String spacePermission) Converts the space permission type into anOperationDescriptiontoPermissionType(OperationDescription operation) Converts the OperationDescription into a SpacePermission.type
-
Method Details
-
toOperation
Converts the space permission type into anOperationDescriptionIt first checks the set of built-in SpacePermissions for a mapping from Permission type to
OperationDescription- Parameters:
spacePermission- the permission to convert seecom.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
Converts the OperationDescription into a SpacePermission.type- Parameters:
operation- the operation to convert- Returns:
- a type suitable for storing in the database
-