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 ContentPermissionSet
s- See Also:
-
Constructor Summary
ConstructorDescriptionContentRestrictionFactory
(PersonFactory personFactory, Supplier<ContentFactory> contentFactorySupplier, NavigationService navigationService) -
Method Summary
Modifier and TypeMethodDescriptionbuildFrom
(@NonNull ContentPermissionSet set, LimitedRequest limitedRequest, Expansions expansions) Produces aContentRestriction
from aContentPermissionSet
sbuildFrom
(ContentPermissionSet hibernateObject, Expansions expansions) static OperationKey
determineOpKey
(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 recognizableOperationKey
s which can be accepted from the requests.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 aContentRestriction
from aContentPermissionSet
s -
buildFrom
- Specified by:
buildFrom
in 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 recognizableOperationKey
s which can be accepted from the requests. Pre-populated bi-directional map of allowed OperationKeys to ContentPermissions is stored inopKeyToPermissionBiMap
- Returns:
-
extractPermissionType(OperationKey)