org.apache.sling.oak.restrictions.impl

## Class ResourceTypePattern

- java.lang.Object
- - org.apache.sling.oak.restrictions.impl.ResourceTypePattern

All Implemented Interfaces:
  org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionPattern

    public class ResourceTypePattern
    extends Object
    implements org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionPattern

Implementation of the `RestrictionPattern` interface that returns `true` if the resource type of the target tree (or the parent of a target property) is contained in the configured resource type.

### Field Summary

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

`EMPTY`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals(Object obj)`
`String` `getResourceTypeFromTree(org.apache.jackrabbit.oak.api.Tree treeToCheck)`
`int` `hashCode()`
`boolean` `matches()`
`boolean` `matches(@NotNull String path)`
`boolean` `matches(@NotNull org.apache.jackrabbit.oak.api.Tree tree, @Nullable org.apache.jackrabbit.oak.api.PropertyState property)`
`String` `toString()`

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

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Method Detail

#### matches

    public boolean matches(@NotNull
                           @NotNull org.apache.jackrabbit.oak.api.Tree tree,
                           @Nullable
                           @Nullable org.apache.jackrabbit.oak.api.PropertyState property)

Specified by:
  `matches` in interface `org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionPattern`

#### getResourceTypeFromTree

    public String getResourceTypeFromTree(org.apache.jackrabbit.oak.api.Tree treeToCheck)

#### matches

    public boolean matches(@NotNull
                           @NotNull String path)

Specified by:
  `matches` in interface `org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionPattern`

#### matches

    public boolean matches()

Specified by:
  `matches` in interface `org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionPattern`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`