Class EffectiveNodeType
- java.lang.Object
-
- org.apache.jackrabbit.core.nodetype.EffectiveNodeType
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckAddNodeConstraints(Name name)voidcheckAddNodeConstraints(Name name, Name nodeTypeName, NodeTypeRegistry ntReg)voidcheckRemoveItemConstraints(Name name)voidcheckRemoveNodeConstraints(Name name)voidcheckRemovePropertyConstraints(Name name)static voidcheckSetPropertyValueConstraints(QPropertyDefinition pd, InternalValue[] values)Tests if the value constraints defined in the property definitionpdare satisfied by the the specifiedvalues.protected Objectclone()QItemDefinition[]getAllItemDefs()QNodeDefinition[]getAllNodeDefs()Name[]getAllNodeTypes()QPropertyDefinition[]getAllPropDefs()QNodeDefinitiongetApplicableChildNodeDef(Name name, Name nodeTypeName, NodeTypeRegistry ntReg)Returns the applicable child node definition for a child node with the specified name and node type.QPropertyDefinitiongetApplicablePropertyDef(Name name, int type)Returns the applicable property definition for a property with the specified name and type.QPropertyDefinitiongetApplicablePropertyDef(Name name, int type, boolean multiValued)Returns the applicable property definition for a property with the specified name, type and multiValued characteristic.QNodeDefinition[]getAutoCreateNodeDefs()QPropertyDefinition[]getAutoCreatePropDefs()Name[]getInheritedNodeTypes()QNodeDefinition[]getMandatoryNodeDefs()QPropertyDefinition[]getMandatoryPropDefs()Name[]getMergedNodeTypes()QItemDefinition[]getNamedItemDefs()QItemDefinition[]getNamedItemDefs(Name name)QNodeDefinition[]getNamedNodeDefs()QNodeDefinition[]getNamedNodeDefs(Name name)QPropertyDefinition[]getNamedPropDefs()QPropertyDefinition[]getNamedPropDefs(Name name)NamegetPrimaryItemName()QItemDefinition[]getUnnamedItemDefs()QNodeDefinition[]getUnnamedNodeDefs()QPropertyDefinition[]getUnnamedPropDefs()booleanhasNamedItemDef(Name name)booleanhasOrderableChildNodes()Returns true if any of the included node types supports 'orderable child nodes'; returns false otherwise.booleanincludesNodeType(Name nodeTypeName)Determines whether this effective node type representation includes (either through inheritance or aggregation) the given node type.booleanincludesNodeTypes(Name[] nodeTypeNames)Determines whether this effective node type representation includes (either through inheritance or aggregation) all of the given node types.
-
-
-
Method Detail
-
hasOrderableChildNodes
public boolean hasOrderableChildNodes()
Returns true if any of the included node types supports 'orderable child nodes'; returns false otherwise.- Returns:
trueif this effective node type has orderable child nodes
-
getPrimaryItemName
public Name getPrimaryItemName()
-
getMergedNodeTypes
public Name[] getMergedNodeTypes()
-
getInheritedNodeTypes
public Name[] getInheritedNodeTypes()
-
getAllNodeTypes
public Name[] getAllNodeTypes()
-
getAllItemDefs
public QItemDefinition[] getAllItemDefs()
-
getNamedItemDefs
public QItemDefinition[] getNamedItemDefs()
-
getUnnamedItemDefs
public QItemDefinition[] getUnnamedItemDefs()
-
hasNamedItemDef
public boolean hasNamedItemDef(Name name)
-
getNamedItemDefs
public QItemDefinition[] getNamedItemDefs(Name name)
-
getAllNodeDefs
public QNodeDefinition[] getAllNodeDefs()
-
getNamedNodeDefs
public QNodeDefinition[] getNamedNodeDefs()
-
getNamedNodeDefs
public QNodeDefinition[] getNamedNodeDefs(Name name)
-
getUnnamedNodeDefs
public QNodeDefinition[] getUnnamedNodeDefs()
-
getAutoCreateNodeDefs
public QNodeDefinition[] getAutoCreateNodeDefs()
-
getAllPropDefs
public QPropertyDefinition[] getAllPropDefs()
-
getNamedPropDefs
public QPropertyDefinition[] getNamedPropDefs()
-
getNamedPropDefs
public QPropertyDefinition[] getNamedPropDefs(Name name)
-
getUnnamedPropDefs
public QPropertyDefinition[] getUnnamedPropDefs()
-
getAutoCreatePropDefs
public QPropertyDefinition[] getAutoCreatePropDefs()
-
getMandatoryPropDefs
public QPropertyDefinition[] getMandatoryPropDefs()
-
getMandatoryNodeDefs
public QNodeDefinition[] getMandatoryNodeDefs()
-
includesNodeType
public boolean includesNodeType(Name nodeTypeName)
Determines whether this effective node type representation includes (either through inheritance or aggregation) the given node type.- Parameters:
nodeTypeName- name of node type- Returns:
trueif the given node type is included, otherwisefalse
-
includesNodeTypes
public boolean includesNodeTypes(Name[] nodeTypeNames)
Determines whether this effective node type representation includes (either through inheritance or aggregation) all of the given node types.- Parameters:
nodeTypeNames- array of node type names- Returns:
trueif all of the given node types are included, otherwisefalse
-
checkSetPropertyValueConstraints
public static void checkSetPropertyValueConstraints(QPropertyDefinition pd, InternalValue[] values) throws ConstraintViolationException, RepositoryException
Tests if the value constraints defined in the property definitionpdare satisfied by the the specifiedvalues.Note that the protected flag is not checked. Also note that no type conversions are attempted if the type of the given values does not match the required type as specified in the given definition.
- Parameters:
pd- The definiton of the propertyvalues- An array ofInternalValueobjects.- Throws:
ConstraintViolationException- if the value constraints defined in the property definition are satisfied by the the specified valuesRepositoryException- if another error occurs
-
checkAddNodeConstraints
public void checkAddNodeConstraints(Name name) throws ConstraintViolationException
- Parameters:
name-- Throws:
ConstraintViolationException
-
checkAddNodeConstraints
public void checkAddNodeConstraints(Name name, Name nodeTypeName, NodeTypeRegistry ntReg) throws ConstraintViolationException, NoSuchNodeTypeException
- Parameters:
name-nodeTypeName-ntReg-- Throws:
ConstraintViolationExceptionNoSuchNodeTypeException
-
getApplicableChildNodeDef
public QNodeDefinition getApplicableChildNodeDef(Name name, Name nodeTypeName, NodeTypeRegistry ntReg) throws NoSuchNodeTypeException, ConstraintViolationException
Returns the applicable child node definition for a child node with the specified name and node type. If there are multiple applicable definitions named definitions will take precedence over residual definitions.- Parameters:
name-nodeTypeName-ntReg-- Returns:
- Throws:
NoSuchNodeTypeExceptionConstraintViolationException- if no applicable child node definition could be found
-
getApplicablePropertyDef
public QPropertyDefinition getApplicablePropertyDef(Name name, int type, boolean multiValued) throws ConstraintViolationException
Returns the applicable property definition for a property with the specified name, type and multiValued characteristic. If there are multiple applicable definitions the following rules will be applied:- named definitions are preferred to residual definitions
- definitions with specific required type are preferred to definitions with required type UNDEFINED
- Parameters:
name-type-multiValued-- Returns:
- Throws:
ConstraintViolationException- if no applicable property definition could be found
-
getApplicablePropertyDef
public QPropertyDefinition getApplicablePropertyDef(Name name, int type) throws ConstraintViolationException
Returns the applicable property definition for a property with the specified name and type. The multiValued flag is not taken into account in the selection algorithm. Other thanthis method does not take the multiValued flag into account in the selection algorithm. If there more than one applicable definitions then the following rules are applied:getApplicablePropertyDef(Name, int, boolean)- named definitions are preferred to residual definitions
- definitions with specific required type are preferred to definitions with required type UNDEFINED
- single-value definitions are preferred to multiple-value definitions
- Parameters:
name-type-- Returns:
- Throws:
ConstraintViolationException- if no applicable property definition could be found
-
checkRemoveItemConstraints
public void checkRemoveItemConstraints(Name name) throws ConstraintViolationException
- Parameters:
name-- Throws:
ConstraintViolationException
-
checkRemoveNodeConstraints
public void checkRemoveNodeConstraints(Name name) throws ConstraintViolationException
- Parameters:
name-- Throws:
ConstraintViolationException
-
checkRemovePropertyConstraints
public void checkRemovePropertyConstraints(Name name) throws ConstraintViolationException
- Parameters:
name-- Throws:
ConstraintViolationException
-
-