Class NodeDefinitionImpl
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl
-
- All Implemented Interfaces:
ItemDefinition
,NodeDefinition
public class NodeDefinitionImpl extends java.lang.Object implements NodeDefinition
This class implements theNodeDefinition
interface. All method calls are delegated to the wrappedQNodeDefinition
, performing the translation fromName
s to JCR names where necessary.
-
-
Constructor Summary
Constructors Constructor Description NodeDefinitionImpl(QItemDefinition itemDef, NamePathResolver resolver)
Constructor to create a definition that is based on a template.NodeDefinitionImpl(QItemDefinition itemDef, AbstractNodeTypeManager ntMgr, NamePathResolver resolver)
Constructor to create a definition that is based on an existing node type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allowsSameNameSiblings()
boolean
equals(java.lang.Object o)
NodeType
getDeclaringNodeType()
NodeType
getDefaultPrimaryType()
java.lang.String
getDefaultPrimaryTypeName()
java.lang.String
getName()
int
getOnParentVersion()
java.lang.String[]
getRequiredPrimaryTypeNames()
NodeType[]
getRequiredPrimaryTypes()
int
hashCode()
boolean
isAutoCreated()
boolean
isMandatory()
boolean
isProtected()
QNodeDefinition
unwrap()
Returns the wrapped node definition.-
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.jcr.nodetype.ItemDefinition
getDeclaringNodeType, getName, getOnParentVersion, isAutoCreated, isMandatory, isProtected
-
-
-
-
Constructor Detail
-
NodeDefinitionImpl
public NodeDefinitionImpl(QItemDefinition itemDef, NamePathResolver resolver)
Constructor to create a definition that is based on a template.- Parameters:
itemDef
- item definitionresolver
-
-
NodeDefinitionImpl
public NodeDefinitionImpl(QItemDefinition itemDef, AbstractNodeTypeManager ntMgr, NamePathResolver resolver)
Constructor to create a definition that is based on an existing node type.- Parameters:
itemDef
- item definitionresolver
-
-
-
Method Detail
-
unwrap
public QNodeDefinition unwrap()
Returns the wrapped node definition.- Returns:
- the wrapped node definition.
-
allowsSameNameSiblings
public boolean allowsSameNameSiblings()
- Specified by:
allowsSameNameSiblings
in interfaceNodeDefinition
-
getDefaultPrimaryTypeName
public java.lang.String getDefaultPrimaryTypeName()
- Specified by:
getDefaultPrimaryTypeName
in interfaceNodeDefinition
- Since:
- JCR 2.0
- See Also:
NodeDefinition.getDefaultPrimaryTypeName()
-
getDefaultPrimaryType
public NodeType getDefaultPrimaryType()
- Specified by:
getDefaultPrimaryType
in interfaceNodeDefinition
-
getRequiredPrimaryTypes
public NodeType[] getRequiredPrimaryTypes()
- Specified by:
getRequiredPrimaryTypes
in interfaceNodeDefinition
-
getRequiredPrimaryTypeNames
public java.lang.String[] getRequiredPrimaryTypeNames()
- Specified by:
getRequiredPrimaryTypeNames
in interfaceNodeDefinition
- Since:
- JCR 2.0
- See Also:
NodeDefinition.getRequiredPrimaryTypeNames()
-
getDeclaringNodeType
public NodeType getDeclaringNodeType()
- Specified by:
getDeclaringNodeType
in interfaceItemDefinition
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceItemDefinition
-
getOnParentVersion
public int getOnParentVersion()
- Specified by:
getOnParentVersion
in interfaceItemDefinition
-
isAutoCreated
public boolean isAutoCreated()
- Specified by:
isAutoCreated
in interfaceItemDefinition
-
isMandatory
public boolean isMandatory()
- Specified by:
isMandatory
in interfaceItemDefinition
-
isProtected
public boolean isProtected()
- Specified by:
isProtected
in interfaceItemDefinition
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-