Class EffectiveNodeTypeImpl
- java.lang.Object
-
- org.apache.jackrabbit.jcr2spi.nodetype.EffectiveNodeTypeImpl
-
- All Implemented Interfaces:
Cloneable
,EffectiveNodeType
public class EffectiveNodeTypeImpl extends Object implements Cloneable, EffectiveNodeType
AnEffectiveNodeType
represents one or moreNodeType
s as one 'effective' node type where inheritance is resolved.Instances of
EffectiveNodeType
are immutable.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkAddNodeConstraints(Name name, ItemDefinitionProvider definitionProvider)
void
checkAddNodeConstraints(Name name, QNodeTypeDefinition nodeTypeDefinition, ItemDefinitionProvider definitionProvider)
void
checkRemoveItemConstraints(Name name)
protected Object
clone()
Name[]
getAllNodeTypes()
QNodeDefinition[]
getAllQNodeDefinitions()
QPropertyDefinition[]
getAllQPropertyDefinitions()
QNodeDefinition[]
getAutoCreateQNodeDefinitions()
QPropertyDefinition[]
getAutoCreateQPropertyDefinitions()
Name[]
getInheritedNodeTypes()
QNodeDefinition[]
getMandatoryQNodeDefinitions()
QPropertyDefinition[]
getMandatoryQPropertyDefinitions()
Name[]
getMergedNodeTypes()
QNodeDefinition[]
getNamedQNodeDefinitions(Name name)
QPropertyDefinition[]
getNamedQPropertyDefinitions(Name name)
QNodeDefinition[]
getUnnamedQNodeDefinitions()
QPropertyDefinition[]
getUnnamedQPropertyDefinitions()
boolean
hasRemoveNodeConstraint(Name nodeName)
Returnstrue
if a single node definition matching the specifiednodeName
is either mandatory or protected.boolean
hasRemovePropertyConstraint(Name propertyName)
Returnstrue
if a single property definition matching the specifiedpropertyName
is either mandatory or protected.boolean
includesNodeType(Name nodeTypeName)
Determines whether this effective node type representation includes (either through inheritance or aggregation) the given node type.boolean
includesNodeTypes(Name[] nodeTypeNames)
Determines whether this effective node type representation includes (either through inheritance or aggregation) all of the given node types.boolean
supportsMixin(Name mixin)
Determines whether this effective node type supports adding the specified mixin.
-
-
-
Method Detail
-
getInheritedNodeTypes
public Name[] getInheritedNodeTypes()
- Specified by:
getInheritedNodeTypes
in interfaceEffectiveNodeType
- See Also:
EffectiveNodeType.getInheritedNodeTypes()
-
getAllNodeTypes
public Name[] getAllNodeTypes()
- Specified by:
getAllNodeTypes
in interfaceEffectiveNodeType
- See Also:
EffectiveNodeType.getAllNodeTypes()
-
getMergedNodeTypes
public Name[] getMergedNodeTypes()
- Specified by:
getMergedNodeTypes
in interfaceEffectiveNodeType
- See Also:
EffectiveNodeType.getMergedNodeTypes()
-
getAllQNodeDefinitions
public QNodeDefinition[] getAllQNodeDefinitions()
- Specified by:
getAllQNodeDefinitions
in interfaceEffectiveNodeType
- See Also:
EffectiveNodeType.getAllQNodeDefinitions()
-
getAllQPropertyDefinitions
public QPropertyDefinition[] getAllQPropertyDefinitions()
- Specified by:
getAllQPropertyDefinitions
in interfaceEffectiveNodeType
- See Also:
EffectiveNodeType.getAllQPropertyDefinitions()
-
getAutoCreateQNodeDefinitions
public QNodeDefinition[] getAutoCreateQNodeDefinitions()
- Specified by:
getAutoCreateQNodeDefinitions
in interfaceEffectiveNodeType
- See Also:
EffectiveNodeType.getAutoCreateQNodeDefinitions()
-
getAutoCreateQPropertyDefinitions
public QPropertyDefinition[] getAutoCreateQPropertyDefinitions()
- Specified by:
getAutoCreateQPropertyDefinitions
in interfaceEffectiveNodeType
- See Also:
EffectiveNodeType.getAutoCreateQPropertyDefinitions()
-
getMandatoryQPropertyDefinitions
public QPropertyDefinition[] getMandatoryQPropertyDefinitions()
- Specified by:
getMandatoryQPropertyDefinitions
in interfaceEffectiveNodeType
- See Also:
EffectiveNodeType.getMandatoryQPropertyDefinitions()
-
getMandatoryQNodeDefinitions
public QNodeDefinition[] getMandatoryQNodeDefinitions()
- Specified by:
getMandatoryQNodeDefinitions
in interfaceEffectiveNodeType
- See Also:
EffectiveNodeType.getMandatoryQNodeDefinitions()
-
getNamedQNodeDefinitions
public QNodeDefinition[] getNamedQNodeDefinitions(Name name)
- Specified by:
getNamedQNodeDefinitions
in interfaceEffectiveNodeType
- See Also:
EffectiveNodeType.getNamedQNodeDefinitions(Name)
-
getUnnamedQNodeDefinitions
public QNodeDefinition[] getUnnamedQNodeDefinitions()
- Specified by:
getUnnamedQNodeDefinitions
in interfaceEffectiveNodeType
- See Also:
EffectiveNodeType.getUnnamedQNodeDefinitions()
-
getNamedQPropertyDefinitions
public QPropertyDefinition[] getNamedQPropertyDefinitions(Name name)
- Specified by:
getNamedQPropertyDefinitions
in interfaceEffectiveNodeType
- See Also:
EffectiveNodeType.getNamedQPropertyDefinitions(Name)
-
getUnnamedQPropertyDefinitions
public QPropertyDefinition[] getUnnamedQPropertyDefinitions()
- Specified by:
getUnnamedQPropertyDefinitions
in interfaceEffectiveNodeType
- See Also:
EffectiveNodeType.getUnnamedQPropertyDefinitions()
-
includesNodeType
public boolean includesNodeType(Name nodeTypeName)
Description copied from interface:EffectiveNodeType
Determines whether this effective node type representation includes (either through inheritance or aggregation) the given node type.- Specified by:
includesNodeType
in interfaceEffectiveNodeType
- Parameters:
nodeTypeName
- name of node type- Returns:
true
if the given node type is included, otherwisefalse
-
includesNodeTypes
public boolean includesNodeTypes(Name[] nodeTypeNames)
Description copied from interface:EffectiveNodeType
Determines whether this effective node type representation includes (either through inheritance or aggregation) all of the given node types.- Specified by:
includesNodeTypes
in interfaceEffectiveNodeType
- Parameters:
nodeTypeNames
- array of node type names- Returns:
true
if all of the given node types are included, otherwisefalse
-
supportsMixin
public boolean supportsMixin(Name mixin)
Description copied from interface:EffectiveNodeType
Determines whether this effective node type supports adding the specified mixin.- Specified by:
supportsMixin
in interfaceEffectiveNodeType
- Parameters:
mixin
- name of mixin type- Returns:
true
if the mixin type is supported, otherwisefalse
- See Also:
EffectiveNodeType.supportsMixin(Name)
-
checkAddNodeConstraints
public void checkAddNodeConstraints(Name name, ItemDefinitionProvider definitionProvider) throws ConstraintViolationException
- Specified by:
checkAddNodeConstraints
in interfaceEffectiveNodeType
- Throws:
ConstraintViolationException
- See Also:
EffectiveNodeType.checkAddNodeConstraints(Name, ItemDefinitionProvider)
-
checkAddNodeConstraints
public void checkAddNodeConstraints(Name name, QNodeTypeDefinition nodeTypeDefinition, ItemDefinitionProvider definitionProvider) throws ConstraintViolationException, NoSuchNodeTypeException
- Specified by:
checkAddNodeConstraints
in interfaceEffectiveNodeType
- Throws:
ConstraintViolationException
- @throws NoSuchNodeTypeExceptionNoSuchNodeTypeException
- See Also:
EffectiveNodeType.checkAddNodeConstraints(org.apache.jackrabbit.spi.Name,QNodeTypeDefinition, ItemDefinitionProvider)
-
checkRemoveItemConstraints
public void checkRemoveItemConstraints(Name name) throws ConstraintViolationException
- Specified by:
checkRemoveItemConstraints
in interfaceEffectiveNodeType
- Throws:
ConstraintViolationException
- See Also:
EffectiveNodeType.checkRemoveItemConstraints(Name)
-
hasRemoveNodeConstraint
public boolean hasRemoveNodeConstraint(Name nodeName)
Description copied from interface:EffectiveNodeType
Returnstrue
if a single node definition matching the specifiednodeName
is either mandatory or protected.- Specified by:
hasRemoveNodeConstraint
in interfaceEffectiveNodeType
- Returns:
true
if a single node definition matching the specifiednodeName
is either mandatory or protected.- See Also:
EffectiveNodeType.hasRemoveNodeConstraint(Name)
-
hasRemovePropertyConstraint
public boolean hasRemovePropertyConstraint(Name propertyName)
Description copied from interface:EffectiveNodeType
Returnstrue
if a single property definition matching the specifiedpropertyName
is either mandatory or protected.- Specified by:
hasRemovePropertyConstraint
in interfaceEffectiveNodeType
- Returns:
true
if a single property definition matching the specifiedpropertyName
is either mandatory or protected.- See Also:
EffectiveNodeType.hasRemovePropertyConstraint(Name)
-
-