Search in sources :

Example 1 with AbstractRestrictionProvider

use of org.apache.jackrabbit.oak.spi.security.authorization.restriction.AbstractRestrictionProvider in project jackrabbit-oak by apache.

the class AbstractAccessControlListTest method getRestrictionProvider.

protected RestrictionProvider getRestrictionProvider() {
    Map<String, RestrictionDefinition> rDefs = new HashMap();
    rDefs.put("r1", new RestrictionDefinitionImpl("r1", Type.STRING, true));
    rDefs.put("r2", new RestrictionDefinitionImpl("r2", Type.LONGS, false));
    return new AbstractRestrictionProvider(rDefs) {

        @Nonnull
        @Override
        public RestrictionPattern getPattern(@Nullable String oakPath, @Nonnull Tree tree) {
            throw new UnsupportedOperationException();
        }

        @Nonnull
        @Override
        public RestrictionPattern getPattern(@Nullable String oakPath, @Nonnull Set<Restriction> restrictions) {
            throw new UnsupportedOperationException();
        }
    };
}
Also used : AbstractRestrictionProvider(org.apache.jackrabbit.oak.spi.security.authorization.restriction.AbstractRestrictionProvider) Set(java.util.Set) HashMap(java.util.HashMap) Nonnull(javax.annotation.Nonnull) RestrictionDefinitionImpl(org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionDefinitionImpl) Tree(org.apache.jackrabbit.oak.api.Tree) RestrictionDefinition(org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionDefinition) Nullable(javax.annotation.Nullable)

Aggregations

HashMap (java.util.HashMap)1 Set (java.util.Set)1 Nonnull (javax.annotation.Nonnull)1 Nullable (javax.annotation.Nullable)1 Tree (org.apache.jackrabbit.oak.api.Tree)1 AbstractRestrictionProvider (org.apache.jackrabbit.oak.spi.security.authorization.restriction.AbstractRestrictionProvider)1 RestrictionDefinition (org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionDefinition)1 RestrictionDefinitionImpl (org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionDefinitionImpl)1