public class ContentRestrictionFactory extends ModelFactory<ContentPermissionSet,ContentRestriction>
ContentRestriction from provided ContentPermissionSetsContentRestrictionService| Constructor and Description |
|---|
ContentRestrictionFactory(PersonFactory personFactory,
com.google.common.base.Supplier<ContentFactory> contentFactorySupplier,
NavigationService navigationService) |
| Modifier and Type | Method and Description |
|---|---|
ContentRestriction |
buildFrom(ContentPermissionSet hibernateObject,
Expansions expansions) |
ContentRestriction |
buildFrom(ContentPermissionSet set,
LimitedRequest limitedRequest,
Expansions expansions)
Produces a
ContentRestriction from a ContentPermissionSets |
static OperationKey |
determineOpKey(String permissionType)
Given a raw ContentPermission type, return its corresponding OperationKey.
|
static com.atlassian.fugue.Option<String> |
determinePermissionType(OperationKey key)
Deprecated.
since 6.5 use
extractPermissionType(OperationKey) |
static Optional<String> |
extractPermissionType(OperationKey key)
Given an OperationKey, determine the raw ContentPermission type.
|
static com.google.common.collect.ImmutableSet<OperationKey> |
getSupportedOperationKeys()
Lists all recognizable
OperationKeys which can be accepted from the requests. |
asFunction, buildFrompublic ContentRestrictionFactory(PersonFactory personFactory, com.google.common.base.Supplier<ContentFactory> contentFactorySupplier, NavigationService navigationService)
public ContentRestriction buildFrom(@Nonnull ContentPermissionSet set, LimitedRequest limitedRequest, Expansions expansions)
ContentRestriction from a ContentPermissionSetspublic ContentRestriction buildFrom(ContentPermissionSet hibernateObject, Expansions expansions)
buildFrom in class ModelFactory<ContentPermissionSet,ContentRestriction>public static OperationKey determineOpKey(String permissionType)
opKeyToPermissionBiMappermissionType - the raw permission type for which to return the matching OperationKeyOperationKey (will be custom if not one of pre-defined)@Deprecated public static com.atlassian.fugue.Option<String> determinePermissionType(OperationKey key)
extractPermissionType(OperationKey)opKeyToPermissionBiMapkey - the operation key for which to return the matching permission typeOptionpublic static Optional<String> extractPermissionType(OperationKey key)
opKeyToPermissionBiMapkey - the operation key for which to return the matching permission typeOptionpublic static com.google.common.collect.ImmutableSet<OperationKey> getSupportedOperationKeys()
OperationKeys which can be accepted from the requests.
Pre-populated bi-directional map of allowed OperationKeys to ContentPermissions is stored in opKeyToPermissionBiMapCopyright © 2003–2019 Atlassian. All rights reserved.