Class PrincipalRestrictionProvider

  • All Implemented Interfaces:
    org.apache.jackrabbit.oak.spi.security.authorization.accesscontrol.AccessControlConstants, org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionProvider

    public class PrincipalRestrictionProvider
    extends java.lang.Object
    implements org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionProvider, org.apache.jackrabbit.oak.spi.security.authorization.accesscontrol.AccessControlConstants
    Restriction provider implementation used for editing access control by principal. It wraps the configured base provider and adds a mandatory restriction definition with name AccessControlConstants.REP_NODE_PATH and type PATH which stores the path of the access controlled node to which a given access control entry will be applied.
    • Field Summary

      • Fields inherited from interface org.apache.jackrabbit.oak.spi.security.authorization.accesscontrol.AccessControlConstants

        AC_NODETYPE_NAMES, ACE_PROPERTY_NAMES, MIX_REP_ACCESS_CONTROLLABLE, MIX_REP_REPO_ACCESS_CONTROLLABLE, NT_REP_ACE, NT_REP_ACL, NT_REP_DENY_ACE, NT_REP_GRANT_ACE, NT_REP_POLICY, NT_REP_RESTRICTIONS, PARAM_RESTRICTION_PROVIDER, POLICY_NODE_NAMES, REP_CURRENT, REP_GLOB, REP_ITEM_NAMES, REP_NODE_PATH, REP_NT_NAMES, REP_POLICY, REP_PREFIXES, REP_PRINCIPAL_NAME, REP_PRIVILEGES, REP_REPO_POLICY, REP_RESTRICTIONS
      • Fields inherited from interface org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionProvider

        EMPTY
    • Constructor Summary

      Constructors 
      Constructor Description
      PrincipalRestrictionProvider​(@NotNull org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionProvider base)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @NotNull org.apache.jackrabbit.oak.spi.security.authorization.restriction.Restriction createRestriction​(@Nullable java.lang.String oakPath, @NotNull java.lang.String oakName, @NotNull Value value)  
      @NotNull org.apache.jackrabbit.oak.spi.security.authorization.restriction.Restriction createRestriction​(@Nullable java.lang.String oakPath, @NotNull java.lang.String oakName, @NotNull Value... values)  
      @NotNull org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionPattern getPattern​(@Nullable java.lang.String oakPath, @NotNull java.util.Set<org.apache.jackrabbit.oak.spi.security.authorization.restriction.Restriction> restrictions)  
      @NotNull org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionPattern getPattern​(@Nullable java.lang.String oakPath, @NotNull org.apache.jackrabbit.oak.api.Tree tree)  
      @NotNull java.util.Set<org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionDefinition> getSupportedRestrictions​(@Nullable java.lang.String oakPath)  
      @NotNull java.util.Set<org.apache.jackrabbit.oak.spi.security.authorization.restriction.Restriction> readRestrictions​(@Nullable java.lang.String oakPath, @NotNull org.apache.jackrabbit.oak.api.Tree aceTree)  
      void validateRestrictions​(@Nullable java.lang.String oakPath, @NotNull org.apache.jackrabbit.oak.api.Tree aceTree)  
      void writeRestrictions​(@Nullable java.lang.String oakPath, @NotNull org.apache.jackrabbit.oak.api.Tree aceTree, @NotNull java.util.Set<org.apache.jackrabbit.oak.spi.security.authorization.restriction.Restriction> restrictions)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PrincipalRestrictionProvider

        public PrincipalRestrictionProvider​(@NotNull
                                            @NotNull org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionProvider base)
    • Method Detail

      • getSupportedRestrictions

        @NotNull
        public @NotNull java.util.Set<org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionDefinition> getSupportedRestrictions​(@Nullable
                                                                                                                                                       @Nullable java.lang.String oakPath)
        Specified by:
        getSupportedRestrictions in interface org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionProvider
      • createRestriction

        @NotNull
        public @NotNull org.apache.jackrabbit.oak.spi.security.authorization.restriction.Restriction createRestriction​(@Nullable
                                                                                                                       @Nullable java.lang.String oakPath,
                                                                                                                       @NotNull
                                                                                                                       @NotNull java.lang.String oakName,
                                                                                                                       @NotNull
                                                                                                                       @NotNull Value value)
                                                                                                                throws RepositoryException
        Specified by:
        createRestriction in interface org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionProvider
        Throws:
        RepositoryException
      • createRestriction

        @NotNull
        public @NotNull org.apache.jackrabbit.oak.spi.security.authorization.restriction.Restriction createRestriction​(@Nullable
                                                                                                                       @Nullable java.lang.String oakPath,
                                                                                                                       @NotNull
                                                                                                                       @NotNull java.lang.String oakName,
                                                                                                                       @NotNull
                                                                                                                       @NotNull Value... values)
                                                                                                                throws RepositoryException
        Specified by:
        createRestriction in interface org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionProvider
        Throws:
        RepositoryException
      • readRestrictions

        @NotNull
        public @NotNull java.util.Set<org.apache.jackrabbit.oak.spi.security.authorization.restriction.Restriction> readRestrictions​(@Nullable
                                                                                                                                     @Nullable java.lang.String oakPath,
                                                                                                                                     @NotNull
                                                                                                                                     @NotNull org.apache.jackrabbit.oak.api.Tree aceTree)
        Specified by:
        readRestrictions in interface org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionProvider
      • writeRestrictions

        public void writeRestrictions​(@Nullable
                                      @Nullable java.lang.String oakPath,
                                      @NotNull
                                      @NotNull org.apache.jackrabbit.oak.api.Tree aceTree,
                                      @NotNull
                                      @NotNull java.util.Set<org.apache.jackrabbit.oak.spi.security.authorization.restriction.Restriction> restrictions)
                               throws RepositoryException
        Specified by:
        writeRestrictions in interface org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionProvider
        Throws:
        RepositoryException
      • validateRestrictions

        public void validateRestrictions​(@Nullable
                                         @Nullable java.lang.String oakPath,
                                         @NotNull
                                         @NotNull org.apache.jackrabbit.oak.api.Tree aceTree)
                                  throws RepositoryException
        Specified by:
        validateRestrictions in interface org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionProvider
        Throws:
        RepositoryException
      • getPattern

        @NotNull
        public @NotNull org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionPattern getPattern​(@Nullable
                                                                                                                       @Nullable java.lang.String oakPath,
                                                                                                                       @NotNull
                                                                                                                       @NotNull org.apache.jackrabbit.oak.api.Tree tree)
        Specified by:
        getPattern in interface org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionProvider
      • getPattern

        @NotNull
        public @NotNull org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionPattern getPattern​(@Nullable
                                                                                                                       @Nullable java.lang.String oakPath,
                                                                                                                       @NotNull
                                                                                                                       @NotNull java.util.Set<org.apache.jackrabbit.oak.spi.security.authorization.restriction.Restriction> restrictions)
        Specified by:
        getPattern in interface org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionProvider