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 void
checkAddNodeConstraints(org.apache.jackrabbit.spi.Name name)
void
checkAddNodeConstraints(org.apache.jackrabbit.spi.Name name, org.apache.jackrabbit.spi.Name nodeTypeName, NodeTypeRegistry ntReg)
void
checkRemoveItemConstraints(org.apache.jackrabbit.spi.Name name)
void
checkRemoveNodeConstraints(org.apache.jackrabbit.spi.Name name)
void
checkRemovePropertyConstraints(org.apache.jackrabbit.spi.Name name)
static void
checkSetPropertyValueConstraints(org.apache.jackrabbit.spi.QPropertyDefinition pd, InternalValue[] values)
Tests if the value constraints defined in the property definitionpd
are satisfied by the the specifiedvalues
.protected Object
clone()
org.apache.jackrabbit.spi.QItemDefinition[]
getAllItemDefs()
org.apache.jackrabbit.spi.QNodeDefinition[]
getAllNodeDefs()
org.apache.jackrabbit.spi.Name[]
getAllNodeTypes()
org.apache.jackrabbit.spi.QPropertyDefinition[]
getAllPropDefs()
org.apache.jackrabbit.spi.QNodeDefinition
getApplicableChildNodeDef(org.apache.jackrabbit.spi.Name name, org.apache.jackrabbit.spi.Name nodeTypeName, NodeTypeRegistry ntReg)
Returns the applicable child node definition for a child node with the specified name and node type.org.apache.jackrabbit.spi.QPropertyDefinition
getApplicablePropertyDef(org.apache.jackrabbit.spi.Name name, int type)
Returns the applicable property definition for a property with the specified name and type.org.apache.jackrabbit.spi.QPropertyDefinition
getApplicablePropertyDef(org.apache.jackrabbit.spi.Name name, int type, boolean multiValued)
Returns the applicable property definition for a property with the specified name, type and multiValued characteristic.org.apache.jackrabbit.spi.QNodeDefinition[]
getAutoCreateNodeDefs()
org.apache.jackrabbit.spi.QPropertyDefinition[]
getAutoCreatePropDefs()
org.apache.jackrabbit.spi.Name[]
getInheritedNodeTypes()
org.apache.jackrabbit.spi.QNodeDefinition[]
getMandatoryNodeDefs()
org.apache.jackrabbit.spi.QPropertyDefinition[]
getMandatoryPropDefs()
org.apache.jackrabbit.spi.Name[]
getMergedNodeTypes()
org.apache.jackrabbit.spi.QItemDefinition[]
getNamedItemDefs()
org.apache.jackrabbit.spi.QItemDefinition[]
getNamedItemDefs(org.apache.jackrabbit.spi.Name name)
org.apache.jackrabbit.spi.QNodeDefinition[]
getNamedNodeDefs()
org.apache.jackrabbit.spi.QNodeDefinition[]
getNamedNodeDefs(org.apache.jackrabbit.spi.Name name)
org.apache.jackrabbit.spi.QPropertyDefinition[]
getNamedPropDefs()
org.apache.jackrabbit.spi.QPropertyDefinition[]
getNamedPropDefs(org.apache.jackrabbit.spi.Name name)
org.apache.jackrabbit.spi.Name
getPrimaryItemName()
org.apache.jackrabbit.spi.QItemDefinition[]
getUnnamedItemDefs()
org.apache.jackrabbit.spi.QNodeDefinition[]
getUnnamedNodeDefs()
org.apache.jackrabbit.spi.QPropertyDefinition[]
getUnnamedPropDefs()
boolean
hasNamedItemDef(org.apache.jackrabbit.spi.Name name)
boolean
hasOrderableChildNodes()
Returns true if any of the included node types supports 'orderable child nodes'; returns false otherwise.boolean
includesNodeType(org.apache.jackrabbit.spi.Name nodeTypeName)
Determines whether this effective node type representation includes (either through inheritance or aggregation) the given node type.boolean
includesNodeTypes(org.apache.jackrabbit.spi.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:
true
if this effective node type has orderable child nodes
-
getPrimaryItemName
public org.apache.jackrabbit.spi.Name getPrimaryItemName()
-
getMergedNodeTypes
public org.apache.jackrabbit.spi.Name[] getMergedNodeTypes()
-
getInheritedNodeTypes
public org.apache.jackrabbit.spi.Name[] getInheritedNodeTypes()
-
getAllNodeTypes
public org.apache.jackrabbit.spi.Name[] getAllNodeTypes()
-
getAllItemDefs
public org.apache.jackrabbit.spi.QItemDefinition[] getAllItemDefs()
-
getNamedItemDefs
public org.apache.jackrabbit.spi.QItemDefinition[] getNamedItemDefs()
-
getUnnamedItemDefs
public org.apache.jackrabbit.spi.QItemDefinition[] getUnnamedItemDefs()
-
hasNamedItemDef
public boolean hasNamedItemDef(org.apache.jackrabbit.spi.Name name)
-
getNamedItemDefs
public org.apache.jackrabbit.spi.QItemDefinition[] getNamedItemDefs(org.apache.jackrabbit.spi.Name name)
-
getAllNodeDefs
public org.apache.jackrabbit.spi.QNodeDefinition[] getAllNodeDefs()
-
getNamedNodeDefs
public org.apache.jackrabbit.spi.QNodeDefinition[] getNamedNodeDefs()
-
getNamedNodeDefs
public org.apache.jackrabbit.spi.QNodeDefinition[] getNamedNodeDefs(org.apache.jackrabbit.spi.Name name)
-
getUnnamedNodeDefs
public org.apache.jackrabbit.spi.QNodeDefinition[] getUnnamedNodeDefs()
-
getAutoCreateNodeDefs
public org.apache.jackrabbit.spi.QNodeDefinition[] getAutoCreateNodeDefs()
-
getAllPropDefs
public org.apache.jackrabbit.spi.QPropertyDefinition[] getAllPropDefs()
-
getNamedPropDefs
public org.apache.jackrabbit.spi.QPropertyDefinition[] getNamedPropDefs()
-
getNamedPropDefs
public org.apache.jackrabbit.spi.QPropertyDefinition[] getNamedPropDefs(org.apache.jackrabbit.spi.Name name)
-
getUnnamedPropDefs
public org.apache.jackrabbit.spi.QPropertyDefinition[] getUnnamedPropDefs()
-
getAutoCreatePropDefs
public org.apache.jackrabbit.spi.QPropertyDefinition[] getAutoCreatePropDefs()
-
getMandatoryPropDefs
public org.apache.jackrabbit.spi.QPropertyDefinition[] getMandatoryPropDefs()
-
getMandatoryNodeDefs
public org.apache.jackrabbit.spi.QNodeDefinition[] getMandatoryNodeDefs()
-
includesNodeType
public boolean includesNodeType(org.apache.jackrabbit.spi.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:
true
if the given node type is included, otherwisefalse
-
includesNodeTypes
public boolean includesNodeTypes(org.apache.jackrabbit.spi.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:
true
if all of the given node types are included, otherwisefalse
-
checkSetPropertyValueConstraints
public static void checkSetPropertyValueConstraints(org.apache.jackrabbit.spi.QPropertyDefinition pd, InternalValue[] values) throws ConstraintViolationException, RepositoryException
Tests if the value constraints defined in the property definitionpd
are 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 ofInternalValue
objects.- 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(org.apache.jackrabbit.spi.Name name) throws ConstraintViolationException
- Parameters:
name
-- Throws:
ConstraintViolationException
-
checkAddNodeConstraints
public void checkAddNodeConstraints(org.apache.jackrabbit.spi.Name name, org.apache.jackrabbit.spi.Name nodeTypeName, NodeTypeRegistry ntReg) throws ConstraintViolationException, NoSuchNodeTypeException
- Parameters:
name
-nodeTypeName
-ntReg
-- Throws:
ConstraintViolationException
NoSuchNodeTypeException
-
getApplicableChildNodeDef
public org.apache.jackrabbit.spi.QNodeDefinition getApplicableChildNodeDef(org.apache.jackrabbit.spi.Name name, org.apache.jackrabbit.spi.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:
NoSuchNodeTypeException
ConstraintViolationException
- if no applicable child node definition could be found
-
getApplicablePropertyDef
public org.apache.jackrabbit.spi.QPropertyDefinition getApplicablePropertyDef(org.apache.jackrabbit.spi.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 org.apache.jackrabbit.spi.QPropertyDefinition getApplicablePropertyDef(org.apache.jackrabbit.spi.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 than
this 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(org.apache.jackrabbit.spi.Name name) throws ConstraintViolationException
- Parameters:
name
-- Throws:
ConstraintViolationException
-
checkRemoveNodeConstraints
public void checkRemoveNodeConstraints(org.apache.jackrabbit.spi.Name name) throws ConstraintViolationException
- Parameters:
name
-- Throws:
ConstraintViolationException
-
checkRemovePropertyConstraints
public void checkRemovePropertyConstraints(org.apache.jackrabbit.spi.Name name) throws ConstraintViolationException
- Parameters:
name
-- Throws:
ConstraintViolationException
-
-