public class ContentRestrictionFactory extends Object implements ContentRestrictionModelFactory
ContentRestriction from provided ContentPermissionSetsContentRestrictionService| Constructor and Description |
|---|
ContentRestrictionFactory(PersonModelFactory personFactory,
com.google.common.base.Supplier<ContentModelFactory> contentFactorySupplier,
NavigationService navigationService) |
| Modifier and Type | Method and Description |
|---|---|
ContentRestriction |
buildFrom(ContentPermissionSet hibernateObject,
Expansions expansions)
Build a single API model from a single Confluence internal entity.
|
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. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasFunction, buildFrompublic ContentRestrictionFactory(PersonModelFactory personFactory, com.google.common.base.Supplier<ContentModelFactory> contentFactorySupplier, NavigationService navigationService)
public ContentRestriction buildFrom(@Nonnull ContentPermissionSet set, LimitedRequest limitedRequest, Expansions expansions)
ContentRestriction from a ContentPermissionSetsbuildFrom in interface ContentRestrictionModelFactorypublic ContentRestriction buildFrom(ContentPermissionSet hibernateObject, Expansions expansions)
ModelFactory
If multiple entities needs conversion, then ModelFactory.buildFrom(Iterable, Expansions) should be used instead, to
allow efficient bulk conversion.
buildFrom in interface 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–2017 Atlassian. All rights reserved.