Class RestrictionDefinitionImpl
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionDefinitionImpl
-
- All Implemented Interfaces:
RestrictionDefinition
public class RestrictionDefinitionImpl extends java.lang.Object implements RestrictionDefinition
Default implementation of theRestrictionDefinitioninterface.
-
-
Constructor Summary
Constructors Constructor Description RestrictionDefinitionImpl(@NotNull java.lang.String name, Type<?> type, boolean isMandatory)Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)@NotNull java.lang.StringgetName()The internal oak name of this restriction definition.@NotNull Type<?>getRequiredType()The required type as defined by this definition.inthashCode()booleanisMandatory()Indicates if this restriction is mandatory.
-
-
-
Constructor Detail
-
RestrictionDefinitionImpl
public RestrictionDefinitionImpl(@NotNull @NotNull java.lang.String name, Type<?> type, boolean isMandatory)Create a new instance.- Parameters:
name- The oak name of the restriction definition.type- The required type of this definition. Any valid JCRPropertyTypeexceptPropertyType.UNDEFINEDis allowed.isMandatory- A boolean indicating if the restriction is mandatory.
-
-
Method Detail
-
getName
@NotNull public @NotNull java.lang.String getName()
Description copied from interface:RestrictionDefinitionThe internal oak name of this restriction definition.- Specified by:
getNamein interfaceRestrictionDefinition- Returns:
- The oak name.
-
getRequiredType
@NotNull public @NotNull Type<?> getRequiredType()
Description copied from interface:RestrictionDefinitionThe required type as defined by this definition.- Specified by:
getRequiredTypein interfaceRestrictionDefinition- Returns:
- The required type which must be a valid
PropertyType.
-
isMandatory
public boolean isMandatory()
Description copied from interface:RestrictionDefinitionIndicates if this restriction is mandatory.- Specified by:
isMandatoryin interfaceRestrictionDefinition- Returns:
trueif this restriction is mandatory;falseotherwise.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
-