Class NodeDefinitionImpl
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl
-
- All Implemented Interfaces:
ItemDefinition
,NodeDefinition
public class NodeDefinitionImpl extends 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.
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
ANY_NAME
Literal for 'any name'.protected QItemDefinition
itemDef
The wrapped item definition.protected AbstractNodeTypeManager
ntMgr
The node type manager of this session.protected NamePathResolver
resolver
The namespace resolver used to translateName
s to JCR name strings.
-
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(Object o)
NodeType
getDeclaringNodeType()
NodeType
getDefaultPrimaryType()
String
getDefaultPrimaryTypeName()
String
getName()
int
getOnParentVersion()
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
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.jcr.nodetype.ItemDefinition
getDeclaringNodeType, getName, getOnParentVersion, isAutoCreated, isMandatory, isProtected
-
-
-
-
Field Detail
-
ANY_NAME
protected static final String ANY_NAME
Literal for 'any name'.- See Also:
- Constant Field Values
-
resolver
protected final NamePathResolver resolver
The namespace resolver used to translateName
s to JCR name strings.
-
ntMgr
protected final AbstractNodeTypeManager ntMgr
The node type manager of this session.
-
itemDef
protected final QItemDefinition itemDef
The wrapped item definition.
-
-
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 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 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 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
-
-