|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.core.nodetype.EffectiveNodeType
An EffectiveNodeType
represents one or more
NodeType
s as one 'effective' node type where inheritance
is resolved.
EffectiveNodeType
are immutable.
Method Summary | |
void |
checkAddNodeConstraints(QName name)
|
void |
checkAddNodeConstraints(QName name,
QName nodeTypeName)
|
void |
checkRemoveItemConstraints(QName name)
|
void |
checkRequiredPrimaryType(QName nodeTypeName,
QName[] requiredPrimaryTypes)
|
static void |
checkSetPropertyValueConstraints(PropDef pd,
InternalValue[] values)
Tests if the value constraints defined in the property definition pd are satisfied by the the specified values . |
protected Object |
clone()
|
static EffectiveNodeType |
create(NodeTypeRegistry ntReg,
NodeTypeDef ntd)
Factory method: creates an effective node type representation of a node type definition. |
ItemDef[] |
getAllItemDefs()
|
NodeDef[] |
getAllNodeDefs()
|
QName[] |
getAllNodeTypes()
|
PropDef[] |
getAllPropDefs()
|
NodeDef |
getApplicableChildNodeDef(QName name,
QName nodeTypeName)
Returns the applicable child node definition for a child node with the specified name and node type. |
PropDef |
getApplicablePropertyDef(QName name,
int type)
Returns the applicable property definition for a property with the specified name and type. |
PropDef |
getApplicablePropertyDef(QName name,
int type,
boolean multiValued)
Returns the applicable property definition for a property with the specified name, type and multiValued characteristic. |
NodeDef[] |
getAutoCreateNodeDefs()
|
PropDef[] |
getAutoCreatePropDefs()
|
QName[] |
getInheritedNodeTypes()
|
NodeDef[] |
getMandatoryNodeDefs()
|
PropDef[] |
getMandatoryPropDefs()
|
QName[] |
getMergedNodeTypes()
|
ItemDef[] |
getNamedItemDefs()
|
ItemDef[] |
getNamedItemDefs(QName name)
|
NodeDef[] |
getNamedNodeDefs()
|
NodeDef[] |
getNamedNodeDefs(QName name)
|
PropDef[] |
getNamedPropDefs()
|
PropDef[] |
getNamedPropDefs(QName name)
|
ItemDef[] |
getUnnamedItemDefs()
|
NodeDef[] |
getUnnamedNodeDefs()
|
PropDef[] |
getUnnamedPropDefs()
|
boolean |
hasNamedItemDef(QName name)
|
boolean |
includesNodeType(QName nodeTypeName)
Determines whether this effective node type representation includes (either through inheritance or aggregation) the given node type. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static EffectiveNodeType create(NodeTypeRegistry ntReg, NodeTypeDef ntd) throws NodeTypeConflictException, NoSuchNodeTypeException
ntReg
- ntd
-
NodeTypeConflictException
NoSuchNodeTypeException
public QName[] getMergedNodeTypes()
public QName[] getInheritedNodeTypes()
public QName[] getAllNodeTypes()
public ItemDef[] getAllItemDefs()
public ItemDef[] getNamedItemDefs()
public ItemDef[] getUnnamedItemDefs()
public boolean hasNamedItemDef(QName name)
public ItemDef[] getNamedItemDefs(QName name)
public NodeDef[] getAllNodeDefs()
public NodeDef[] getNamedNodeDefs()
public NodeDef[] getNamedNodeDefs(QName name)
public NodeDef[] getUnnamedNodeDefs()
public NodeDef[] getAutoCreateNodeDefs()
public PropDef[] getAllPropDefs()
public PropDef[] getNamedPropDefs()
public PropDef[] getNamedPropDefs(QName name)
public PropDef[] getUnnamedPropDefs()
public PropDef[] getAutoCreatePropDefs()
public PropDef[] getMandatoryPropDefs()
public NodeDef[] getMandatoryNodeDefs()
public boolean includesNodeType(QName nodeTypeName)
nodeTypeName
- name of node type
true
if the given node type is included, otherwise
false
public static void checkSetPropertyValueConstraints(PropDef pd, InternalValue[] values) throws ConstraintViolationException, RepositoryException
pd
are satisfied by the the specified values
.
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.
pd
- The definiton of the propertyvalues
- An array of InternalValue
objects.
ConstraintViolationException
- if the value constraints defined in
the property definition are satisfied
by the the specified values
RepositoryException
- if another error occurspublic void checkAddNodeConstraints(QName name) throws ConstraintViolationException
name
-
ConstraintViolationException
public void checkAddNodeConstraints(QName name, QName nodeTypeName) throws ConstraintViolationException, NoSuchNodeTypeException
name
- nodeTypeName
-
ConstraintViolationException
NoSuchNodeTypeException
public NodeDef getApplicableChildNodeDef(QName name, QName nodeTypeName) throws NoSuchNodeTypeException, ConstraintViolationException
name
- nodeTypeName
-
NoSuchNodeTypeException
ConstraintViolationException
- if no applicable child node definition
could be foundpublic PropDef getApplicablePropertyDef(QName name, int type, boolean multiValued) throws ConstraintViolationException
name
- type
- multiValued
-
ConstraintViolationException
- if no applicable property definition
could be foundpublic PropDef getApplicablePropertyDef(QName name, int type) throws ConstraintViolationException
getApplicablePropertyDef(QName, int, boolean)
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:
name
- type
-
ConstraintViolationException
- if no applicable property definition
could be foundpublic void checkRemoveItemConstraints(QName name) throws ConstraintViolationException
name
-
ConstraintViolationException
public void checkRequiredPrimaryType(QName nodeTypeName, QName[] requiredPrimaryTypes) throws ConstraintViolationException, NoSuchNodeTypeException
nodeTypeName
- requiredPrimaryTypes
-
ConstraintViolationException
NoSuchNodeTypeException
protected Object clone()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |