public class ContentRestrictionFactory extends ModelFactory<ContentPermissionSet,ContentRestriction>
ContentRestriction
from provided ContentPermissionSet
sContentRestrictionService
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 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)
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
OperationKey s which can be accepted from the requests. |
asFunction, buildFrom
public 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 ContentPermissionSet
spublic ContentRestriction buildFrom(ContentPermissionSet hibernateObject, Expansions expansions)
buildFrom
in class ModelFactory<ContentPermissionSet,ContentRestriction>
public static OperationKey determineOpKey(String permissionType)
opKeyToPermissionBiMap
permissionType
- 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)
opKeyToPermissionBiMap
key
- the operation key for which to return the matching permission typeOption
public static Optional<String> extractPermissionType(OperationKey key)
opKeyToPermissionBiMap
key
- the operation key for which to return the matching permission typeOption
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.