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)
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 - OperationKey (will be custom if not one of pre-defined)public static com.atlassian.fugue.Option<String> determinePermissionType(OperationKey key)
opKeyToPermissionBiMapkey - Optionpublic 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–2016 Atlassian. All rights reserved.