public class ContentRestrictionFactory extends ModelFactory<ContentPermissionSet,ContentRestriction>
ContentRestriction
from provided ContentPermissionSet
sContentRestrictionService
Constructor and Description |
---|
ContentRestrictionFactory(PersonFactory personFactory,
ContentFactory contentFactory,
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 ContentPermissionSet s |
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
OperationKey s which can be accepted from the requests. |
asFunction, buildFrom
public ContentRestrictionFactory(PersonFactory personFactory, ContentFactory contentFactory, NavigationService navigationService)
public ContentRestriction buildFrom(@Nonnull ContentPermissionSet set, LimitedRequest limitedRequest, Expansions expansions)
ContentRestriction
from a ContentPermissionSet
spublic ContentRestriction buildFrom(ContentPermissionSet hibernateObject, Expansions expansions)
buildFrom
in class ModelFactory<ContentPermissionSet,ContentRestriction>
public static OperationKey determineOpKey(String permissionType)
opKeyToPermissionBiMap
permissionType
- OperationKey
(will be custom if not one of pre-defined)public static com.atlassian.fugue.Option<String> determinePermissionType(OperationKey key)
opKeyToPermissionBiMap
key
- Option
public static com.google.common.collect.ImmutableSet<OperationKey> getSupportedOperationKeys()
OperationKey
s which can be accepted from the requests.
Pre-populated bi-directional map of allowed OperationKeys to ContentPermissions is stored in opKeyToPermissionBiMap
Copyright © 2003–2017 Atlassian. All rights reserved.
View cookie preferences