Class ContentRestrictionFactory

java.lang.Object
com.atlassian.confluence.api.impl.service.permissions.ContentRestrictionFactory
All Implemented Interfaces:
ModelFactory<ContentPermissionSet,ContentRestriction>

public class ContentRestrictionFactory extends Object implements ModelFactory<ContentPermissionSet,ContentRestriction>
See Also:
  • Constructor Details

  • Method Details

    • buildFrom

      public ContentRestriction buildFrom(@NonNull ContentPermissionSet set, LimitedRequest limitedRequest, Expansions expansions)
    • buildFrom

      public ContentRestriction buildFrom(ContentPermissionSet hibernateObject, Expansions expansions)
      Specified by:
      buildFrom in interface ModelFactory<ContentPermissionSet,ContentRestriction>
    • determineOpKey

      public static OperationKey determineOpKey(String permissionType)
      Given a raw ContentPermission type, return its corresponding OperationKey. Pre-populated bi-directional map of allowed OperationKeys to ContentPermissions is stored in opKeyToPermissionBiMap
      Parameters:
      permissionType - the raw permission type for which to return the matching OperationKey
      Returns:
      corresponding OperationKey (will be custom if not one of pre-defined)
    • determinePermissionType

      @Deprecated public static com.atlassian.fugue.Option<String> determinePermissionType(OperationKey key)
      Deprecated.
      Given an OperationKey, determine the raw ContentPermission type. Pre-populated bi-directional map of allowed OperationKeys to ContentPermissions is stored in opKeyToPermissionBiMap
      Parameters:
      key - the operation key for which to return the matching permission type
      Returns:
      corresponding permission type inside an Option
    • extractPermissionType

      public static Optional<String> extractPermissionType(OperationKey key)
      Given an OperationKey, determine the raw ContentPermission type. Pre-populated bi-directional map of allowed OperationKeys to ContentPermissions is stored in opKeyToPermissionBiMap
      Parameters:
      key - the operation key for which to return the matching permission type
      Returns:
      corresponding permission type inside an Option
      Since:
      6.5.0
    • getSupportedOperationKeys

      public static com.google.common.collect.ImmutableSet<OperationKey> getSupportedOperationKeys()
      Lists all recognizable OperationKeys which can be accepted from the requests. Pre-populated bi-directional map of allowed OperationKeys to ContentPermissions is stored in opKeyToPermissionBiMap
      Returns: