Package javax.jcr.nodetype
Interface NodeType
-
- All Superinterfaces:
NodeTypeDefinition
- All Known Implementing Classes:
AbstractNodeType
public interface NodeType extends NodeTypeDefinition
ANodeType
object represents a "live" node type that is registered in the repository.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MIX_CREATED
A constant for the node type namemix:created
(in expanded form).static java.lang.String
MIX_LANGUAGE
A constant for the node type namemix:language
(in expanded form).static java.lang.String
MIX_LAST_MODIFIED
A constant for the node type namemix:lastModified
(in expanded form).static java.lang.String
MIX_LIFECYCLE
A constant for the node type namemix:lifecycle
(in expanded form).static java.lang.String
MIX_LOCKABLE
A constant for the node type namemix:lockable
(in expanded form).static java.lang.String
MIX_MIMETYPE
A constant for the node type namemix:mimeType
(in expanded form).static java.lang.String
MIX_REFERENCEABLE
A constant for the node type namemix:referenceable
(in expanded form).static java.lang.String
MIX_SHAREABLE
A constant for the node type namemix:shareable
(in expanded form).static java.lang.String
MIX_SIMPLE_VERSIONABLE
A constant for the node type namemix:simpleVersionable
(in expanded form).static java.lang.String
MIX_TITLE
A constant for the node type namemix:title
(in expanded form).static java.lang.String
MIX_VERSIONABLE
A constant for the node type namemix:versionable
(in expanded form).static java.lang.String
NT_ACTIVITY
A constant for the node type nament:activity
(in expanded form).static java.lang.String
NT_ADDRESS
A constant for the node type nament:address
(in expanded form).static java.lang.String
NT_BASE
A constant for the node type nament:base
(in expanded form).static java.lang.String
NT_CHILD_NODE_DEFINITION
A constant for the node type nament:childNodeDefinition
(in expanded form).static java.lang.String
NT_CONFIGURATION
A constant for the node type nament:configuration
(in expanded form).static java.lang.String
NT_FILE
A constant for the node type nament:file
(in expanded form).static java.lang.String
NT_FOLDER
A constant for the node type nament:folder
(in expanded form).static java.lang.String
NT_FROZEN_NODE
A constant for the node type nament:frozenNode
(in expanded form).static java.lang.String
NT_HIERARCHY_NODE
A constant for the node type nament:hierarchyNode
(in expanded form).static java.lang.String
NT_LINKED_FILE
A constant for the node type nament:linkedFile
(in expanded form).static java.lang.String
NT_NODE_TYPE
A constant for the node type nament:nodeType
(in expanded form).static java.lang.String
NT_PROPERTY_DEFINITION
A constant for the node type nament:propertyDefinition
(in expanded form).static java.lang.String
NT_QUERY
A constant for the node type nament:query
(in expanded form).static java.lang.String
NT_RESOURCE
A constant for the node type nament:resource
(in expanded form).static java.lang.String
NT_UNSTRUCTURED
A constant for the node type nament:unstructured
(in expanded form).static java.lang.String
NT_VERSION
A constant for the node type nament:version
(in expanded form).static java.lang.String
NT_VERSION_HISTORY
A constant for the node type nament:versionHistory
(in expanded form).static java.lang.String
NT_VERSIONED_CHILD
A constant for the node type nament:versionedChild
(in expanded form).
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description boolean
canAddChildNode(java.lang.String childNodeName)
Returnstrue
if this node type allows the addition of a child node calledchildNodeName
without specific node type information (that is, given the definition of this parent node type, the child node name is sufficient to determine the intended child node type).boolean
canAddChildNode(java.lang.String childNodeName, java.lang.String nodeTypeName)
Returnstrue
if this node type allows the addition of a child node calledchildNodeName
of node typenodeTypeName
.boolean
canRemoveItem(java.lang.String itemName)
Deprecated.As of JCR 2.0, clients should usecanRemoveNode(String)
andcanRemoveProperty(String)
instead.boolean
canRemoveNode(java.lang.String nodeName)
Returnstrue
if removing the child node callednodeName
is allowed by this node type.boolean
canRemoveProperty(java.lang.String propertyName)
Returnstrue
if removing the property calledpropertyName
is allowed by this node type.boolean
canSetProperty(java.lang.String propertyName, Value value)
Returnstrue
if settingpropertyName
tovalue
is allowed by this node type.boolean
canSetProperty(java.lang.String propertyName, Value[] values)
Returnstrue
if settingpropertyName
tovalues
is allowed by this node type.NodeDefinition[]
getChildNodeDefinitions()
Returns an array containing the child node definitions of this node type.NodeTypeIterator
getDeclaredSubtypes()
Returns the direct subtypes of this node type in the node type inheritance hierarchy, that is, those which actually declared this node type in their list of supertypes.NodeType[]
getDeclaredSupertypes()
Returns the direct supertypes of this node type in the node type inheritance hierarchy, that is, those actually declared in this node type.PropertyDefinition[]
getPropertyDefinitions()
Returns an array containing the property definitions of this node type.NodeTypeIterator
getSubtypes()
Returns all subtypes of this node type in the node type inheritance hierarchy.NodeType[]
getSupertypes()
Returns all supertypes of this node type in the node type inheritance hierarchy.boolean
isNodeType(java.lang.String nodeTypeName)
Returnstrue
if the name of this node type or any of its direct or indirect supertypes is equal tonodeTypeName
, otherwise returnsfalse
.-
Methods inherited from interface javax.jcr.nodetype.NodeTypeDefinition
getDeclaredChildNodeDefinitions, getDeclaredPropertyDefinitions, getDeclaredSupertypeNames, getName, getPrimaryItemName, hasOrderableChildNodes, isAbstract, isMixin, isQueryable
-
-
-
-
Field Detail
-
NT_BASE
static final java.lang.String NT_BASE
A constant for the node type nament:base
(in expanded form). Constants for the names of the properties declared bynt:base
are:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
NT_HIERARCHY_NODE
static final java.lang.String NT_HIERARCHY_NODE
A constant for the node type nament:hierarchyNode
(in expanded form).- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
NT_FOLDER
static final java.lang.String NT_FOLDER
A constant for the node type nament:folder
(in expanded form).- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
NT_FILE
static final java.lang.String NT_FILE
A constant for the node type nament:file
(in expanded form). A constant for the name of the child node declared bynt:file
is:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
NT_LINKED_FILE
static final java.lang.String NT_LINKED_FILE
A constant for the node type nament:linkedFile
(in expanded form). A constant for the name of the property declared bynt:linkedFile
is:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
NT_RESOURCE
static final java.lang.String NT_RESOURCE
A constant for the node type nament:resource
(in expanded form). A constant for the name of the property declared bynt:resource
is:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
NT_UNSTRUCTURED
static final java.lang.String NT_UNSTRUCTURED
A constant for the node type nament:unstructured
(in expanded form).- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
NT_ADDRESS
static final java.lang.String NT_ADDRESS
A constant for the node type nament:address
(in expanded form). Constants for the names of the properties declared bynt:base
are:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
MIX_REFERENCEABLE
static final java.lang.String MIX_REFERENCEABLE
A constant for the node type namemix:referenceable
(in expanded form). A constant for the name of the property declared bymix:referenceable
is:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
MIX_TITLE
static final java.lang.String MIX_TITLE
A constant for the node type namemix:title
(in expanded form). Constants for the names of the properties declared bymix:title
are:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
MIX_CREATED
static final java.lang.String MIX_CREATED
A constant for the node type namemix:created
(in expanded form). Constants for the names of the properties declared bymix:created
are:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
MIX_LAST_MODIFIED
static final java.lang.String MIX_LAST_MODIFIED
A constant for the node type namemix:lastModified
(in expanded form). Constants for the names of the properties declared bymix:lastModified
are:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
MIX_LANGUAGE
static final java.lang.String MIX_LANGUAGE
A constant for the node type namemix:language
(in expanded form). A constant for the name of the property declared bymix:language
is:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
MIX_MIMETYPE
static final java.lang.String MIX_MIMETYPE
A constant for the node type namemix:mimeType
(in expanded form). Constants for the names of the properties declared bymix:mimeType
are:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
NT_NODE_TYPE
static final java.lang.String NT_NODE_TYPE
A constant for the node type nament:nodeType
(in expanded form). Constants for the names of the child items declared bynt:nodeType
are:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
NT_PROPERTY_DEFINITION
static final java.lang.String NT_PROPERTY_DEFINITION
A constant for the node type nament:propertyDefinition
(in expanded form). Constants for the names of the properties declared bynt:propertyDefinition
are:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
NT_CHILD_NODE_DEFINITION
static final java.lang.String NT_CHILD_NODE_DEFINITION
A constant for the node type nament:childNodeDefinition
(in expanded form). Constants for the names of the properties declared bynt:childNodeDefinition
are:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
MIX_SHAREABLE
static final java.lang.String MIX_SHAREABLE
A constant for the node type namemix:shareable
(in expanded form).- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
MIX_LOCKABLE
static final java.lang.String MIX_LOCKABLE
A constant for the node type namemix:lockable
(in expanded form). Constants for the names of the properties declared bymix:lockable
are:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
MIX_LIFECYCLE
static final java.lang.String MIX_LIFECYCLE
A constant for the node type namemix:lifecycle
(in expanded form). Constants for the names of the properties declared bymix:lifecycle
are:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
MIX_SIMPLE_VERSIONABLE
static final java.lang.String MIX_SIMPLE_VERSIONABLE
A constant for the node type namemix:simpleVersionable
(in expanded form). A constant for the name of the property declared bymix:simpleVersionable
is:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
MIX_VERSIONABLE
static final java.lang.String MIX_VERSIONABLE
A constant for the node type namemix:versionable
(in expanded form). Constants for the names of the properties declared bymix:versionable
are:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
NT_VERSION_HISTORY
static final java.lang.String NT_VERSION_HISTORY
A constant for the node type nament:versionHistory
(in expanded form). Constants for the names of the child items declared bynt:versionHistory
are:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
NT_VERSION
static final java.lang.String NT_VERSION
A constant for the node type nament:version
(in expanded form). Constants for the names of the child items declared bynt:version
are:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
NT_FROZEN_NODE
static final java.lang.String NT_FROZEN_NODE
A constant for the node type nament:frozenNode
(in expanded form). Constants for the names of the properties declared bynt:frozenNode
are:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
NT_VERSIONED_CHILD
static final java.lang.String NT_VERSIONED_CHILD
A constant for the node type nament:versionedChild
(in expanded form). A constant for the name of the property declared bynt:versionedChild
is:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
NT_ACTIVITY
static final java.lang.String NT_ACTIVITY
A constant for the node type nament:activity
(in expanded form). A constant for the name of the property declared bynt:activity
is:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
NT_CONFIGURATION
static final java.lang.String NT_CONFIGURATION
A constant for the node type nament:configuration
(in expanded form). A constant for the name of the property declared bynt:configuration
are:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
NT_QUERY
static final java.lang.String NT_QUERY
A constant for the node type nament:query
(in expanded form). Constants for the names of the properties declared bynt:query
are:- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSupertypes
NodeType[] getSupertypes()
Returns all supertypes of this node type in the node type inheritance hierarchy. For primary types apart fromnt:base
, this list will always include at leastnt:base
. For mixin types, there is no required supertype.- Returns:
- an array of
NodeType
objects. - See Also:
getDeclaredSupertypes()
-
getDeclaredSupertypes
NodeType[] getDeclaredSupertypes()
Returns the direct supertypes of this node type in the node type inheritance hierarchy, that is, those actually declared in this node type. In single-inheritance systems, this will always be an array of size 0 or 1. In systems that support multiple inheritance of node types this array may be of size greater than 1.- Returns:
- an array of
NodeType
objects. - See Also:
getSupertypes()
-
getSubtypes
NodeTypeIterator getSubtypes()
Returns all subtypes of this node type in the node type inheritance hierarchy.- Returns:
- a
NodeTypeIterator
. - Since:
- JCR 2.0
- See Also:
getDeclaredSubtypes()
-
getDeclaredSubtypes
NodeTypeIterator getDeclaredSubtypes()
Returns the direct subtypes of this node type in the node type inheritance hierarchy, that is, those which actually declared this node type in their list of supertypes.- Returns:
- an
NodeTypeIterator
. - Since:
- JCR 2.0
- See Also:
getSubtypes()
-
isNodeType
boolean isNodeType(java.lang.String nodeTypeName)
Returnstrue
if the name of this node type or any of its direct or indirect supertypes is equal tonodeTypeName
, otherwise returnsfalse
.- Parameters:
nodeTypeName
- the name of a node type.- Returns:
- a boolean
-
getPropertyDefinitions
PropertyDefinition[] getPropertyDefinitions()
Returns an array containing the property definitions of this node type. This includes both those property definitions actually declared in this node type and those inherited from the supertypes of this type.- Returns:
- an array containing the property definitions.
- See Also:
NodeTypeDefinition.getDeclaredPropertyDefinitions()
-
getChildNodeDefinitions
NodeDefinition[] getChildNodeDefinitions()
Returns an array containing the child node definitions of this node type. This includes both those child node definitions actually declared in this node type and those inherited from the supertypes of this node type.- Returns:
- an array containing the child node definitions.
- See Also:
NodeTypeDefinition.getDeclaredChildNodeDefinitions()
-
canSetProperty
boolean canSetProperty(java.lang.String propertyName, Value value)
Returnstrue
if settingpropertyName
tovalue
is allowed by this node type. Otherwise returnsfalse
.- Parameters:
propertyName
- The name of the propertyvalue
- AValue
object.- Returns:
- a boolean
-
canSetProperty
boolean canSetProperty(java.lang.String propertyName, Value[] values)
Returnstrue
if settingpropertyName
tovalues
is allowed by this node type. Otherwise returnsfalse
.- Parameters:
propertyName
- The name of the propertyvalues
- AValue
array.- Returns:
- a boolean
-
canAddChildNode
boolean canAddChildNode(java.lang.String childNodeName)
Returnstrue
if this node type allows the addition of a child node calledchildNodeName
without specific node type information (that is, given the definition of this parent node type, the child node name is sufficient to determine the intended child node type). Returnsfalse
otherwise.- Parameters:
childNodeName
- The name of the child node.- Returns:
- a boolean
-
canAddChildNode
boolean canAddChildNode(java.lang.String childNodeName, java.lang.String nodeTypeName)
Returnstrue
if this node type allows the addition of a child node calledchildNodeName
of node typenodeTypeName
. Returnsfalse
otherwise.- Parameters:
childNodeName
- The name of the child node.nodeTypeName
- The name of the node type of the child node.- Returns:
- a boolean
-
canRemoveItem
boolean canRemoveItem(java.lang.String itemName)
Deprecated.As of JCR 2.0, clients should usecanRemoveNode(String)
andcanRemoveProperty(String)
instead.Returnstrue
if removing the child item calleditemName
is allowed by this node type. Returnsfalse
otherwise.- Parameters:
itemName
- The name of the child item- Returns:
- a boolean
-
canRemoveNode
boolean canRemoveNode(java.lang.String nodeName)
Returnstrue
if removing the child node callednodeName
is allowed by this node type. Returnsfalse
otherwise.- Parameters:
nodeName
- The name of the child node- Returns:
- a boolean
- Since:
- JCR 2.0
-
canRemoveProperty
boolean canRemoveProperty(java.lang.String propertyName)
Returnstrue
if removing the property calledpropertyName
is allowed by this node type. Returnsfalse
otherwise.- Parameters:
propertyName
- The name of the property- Returns:
- a boolean
- Since:
- JCR 2.0
-
-