org.apache.sling.oak.restrictions.impl

## Class SlingRestrictionProviderImpl

- java.lang.Object
- - org.apache.jackrabbit.oak.spi.security.authorization.restriction.AbstractRestrictionProvider
  - - org.apache.sling.oak.restrictions.impl.SlingRestrictionProviderImpl

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

    @Service(value=org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionProvider.class)
    public class SlingRestrictionProviderImpl
    extends org.apache.jackrabbit.oak.spi.security.authorization.restriction.AbstractRestrictionProvider

Sling restriction provider implementation that supports the following restrictions:

- `SLING_RESOURCE_TYPES`: A restriction that allows to match against resource types (matches are exact and do not include children).
- `SLING_RESOURCE_TYPES_WITH_DESCENDANTS`: A restriction that allows to match against resource types and all sub nodes of matching resource types.

Further sling restriction can be added here in future.

### Field Summary

Fields
`static String` `SLING_RESOURCE_TYPES`
`static String` `SLING_RESOURCE_TYPES_WITH_DESCENDANTS`

### Fields inherited from interface org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionProvider

`EMPTY`

### 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_GLOB, REP_NODE_PATH, REP_NT_NAMES, REP_POLICY, REP_PREFIXES, REP_PRINCIPAL_NAME, REP_PRIVILEGES, REP_REPO_POLICY, REP_RESTRICTIONS`

### Constructor Summary

Constructors
Constructor and Description
`SlingRestrictionProviderImpl()`

### Method Summary

All Methods Instance Methods Concrete Methods
`@NotNull org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionPattern` `getPattern(@Nullable String oakPath, @NotNull Set<org.apache.jackrabbit.oak.spi.security.authorization.restriction.Restriction> restrictions)`
`@NotNull org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionPattern` `getPattern(String oakPath, @NotNull org.apache.jackrabbit.oak.api.Tree tree)`

### Methods inherited from class org.apache.jackrabbit.oak.spi.security.authorization.restriction.AbstractRestrictionProvider

`createRestriction, createRestriction, getRestrictionsTree, getSupportedRestrictions, isUnsupportedPath, readRestrictions, validateRestrictions, writeRestrictions`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### SLING_RESOURCE_TYPES

    public static final String SLING_RESOURCE_TYPES

See Also:
  Constant Field Values

#### SLING_RESOURCE_TYPES_WITH_DESCENDANTS

    public static final String SLING_RESOURCE_TYPES_WITH_DESCENDANTS

See Also:
  Constant Field Values

### Constructor Detail

#### SlingRestrictionProviderImpl

    public SlingRestrictionProviderImpl()

### Method Detail

#### getPattern

    @NotNull
    public @NotNull org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionPattern getPattern(String oakPath,
                                                                                                                            @NotNull
                                                                                                                            @NotNull org.apache.jackrabbit.oak.api.Tree tree)

#### getPattern

    @NotNull
    public @NotNull org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionPattern getPattern(@Nullable
                                                                                                                            @Nullable String oakPath,
                                                                                                                            @NotNull
                                                                                                                            @NotNull Set<org.apache.jackrabbit.oak.spi.security.authorization.restriction.Restriction> restrictions)