Class ContentRestrictionFactory
java.lang.Object
com.atlassian.confluence.api.impl.service.permissions.ContentRestrictionFactory
- All Implemented Interfaces:
ModelFactory<ContentPermissionSet,ContentRestriction>
public class ContentRestrictionFactory
extends Object
implements ModelFactory<ContentPermissionSet,ContentRestriction>
Produces
ContentRestriction from provided ContentPermissionSets- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionContentRestrictionFactory(PersonFactory personFactory, Supplier<ContentFactory> contentFactorySupplier, NavigationService navigationService) -
Method Summary
Modifier and TypeMethodDescriptionbuildFrom(@NonNull ContentPermissionSet set, LimitedRequest limitedRequest, Expansions expansions) Produces aContentRestrictionfrom aContentPermissionSetsbuildFrom(ContentPermissionSet hibernateObject, Expansions expansions) static OperationKeydetermineOpKey(String permissionType) Given a raw ContentPermission type, return its corresponding OperationKey.static com.atlassian.fugue.Option<String>Deprecated.Given an OperationKey, determine the raw ContentPermission type.static com.google.common.collect.ImmutableSet<OperationKey>Lists all recognizableOperationKeys which can be accepted from the requests.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.confluence.api.model.ModelFactory
buildFrom
-
Constructor Details
-
Method Details
-
buildFrom
public ContentRestriction buildFrom(@NonNull ContentPermissionSet set, LimitedRequest limitedRequest, Expansions expansions) Produces aContentRestrictionfrom aContentPermissionSets -
buildFrom
- Specified by:
buildFromin interfaceModelFactory<ContentPermissionSet,ContentRestriction>
-
determineOpKey
Given a raw ContentPermission type, return its corresponding OperationKey. Pre-populated bi-directional map of allowed OperationKeys to ContentPermissions is stored inopKeyToPermissionBiMap- Parameters:
permissionType- the raw permission type for which to return the matching OperationKey- Returns:
- corresponding
OperationKey(will be custom if not one of pre-defined)
-
determinePermissionType
@Deprecated public static com.atlassian.fugue.Option<String> determinePermissionType(OperationKey key) Deprecated.since 6.5 useextractPermissionType(OperationKey)Given an OperationKey, determine the raw ContentPermission type. Pre-populated bi-directional map of allowed OperationKeys to ContentPermissions is stored inopKeyToPermissionBiMap- Parameters:
key- the operation key for which to return the matching permission type- Returns:
- corresponding permission type inside an
Option
-
extractPermissionType
Given an OperationKey, determine the raw ContentPermission type. Pre-populated bi-directional map of allowed OperationKeys to ContentPermissions is stored inopKeyToPermissionBiMap- Parameters:
key- the operation key for which to return the matching permission type- Returns:
- corresponding permission type inside an
Option - Since:
- 6.5.0
-
getSupportedOperationKeys
Lists all recognizableOperationKeys which can be accepted from the requests. Pre-populated bi-directional map of allowed OperationKeys to ContentPermissions is stored inopKeyToPermissionBiMap- Returns:
-
extractPermissionType(OperationKey)