Package javax.jcr.nodetype
Interface NodeType
- All Superinterfaces:
NodeTypeDefinition
- All Known Implementing Classes:
AbstractNodeType
A
NodeType object represents a "live" node type that is
registered in the repository.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringA constant for the node type namemix:created(in expanded form).static final StringA constant for the node type namemix:language(in expanded form).static final StringA constant for the node type namemix:lastModified(in expanded form).static final StringA constant for the node type namemix:lifecycle(in expanded form).static final StringA constant for the node type namemix:lockable(in expanded form).static final StringA constant for the node type namemix:mimeType(in expanded form).static final StringA constant for the node type namemix:referenceable(in expanded form).static final StringA constant for the node type namemix:shareable(in expanded form).static final StringA constant for the node type namemix:simpleVersionable(in expanded form).static final StringA constant for the node type namemix:title(in expanded form).static final StringA constant for the node type namemix:versionable(in expanded form).static final StringA constant for the node type nament:activity(in expanded form).static final StringA constant for the node type nament:address(in expanded form).static final StringA constant for the node type nament:base(in expanded form).static final StringA constant for the node type nament:childNodeDefinition(in expanded form).static final StringA constant for the node type nament:configuration(in expanded form).static final StringA constant for the node type nament:file(in expanded form).static final StringA constant for the node type nament:folder(in expanded form).static final StringA constant for the node type nament:frozenNode(in expanded form).static final StringA constant for the node type nament:hierarchyNode(in expanded form).static final StringA constant for the node type nament:linkedFile(in expanded form).static final StringA constant for the node type nament:nodeType(in expanded form).static final StringA constant for the node type nament:propertyDefinition(in expanded form).static final StringA constant for the node type nament:query(in expanded form).static final StringA constant for the node type nament:resource(in expanded form).static final StringA constant for the node type nament:unstructured(in expanded form).static final StringA constant for the node type nament:version(in expanded form).static final StringA constant for the node type nament:versionHistory(in expanded form).static final StringA constant for the node type nament:versionedChild(in expanded form). -
Method Summary
Modifier and TypeMethodDescriptionbooleancanAddChildNode(String childNodeName) Returnstrueif this node type allows the addition of a child node calledchildNodeNamewithout 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).booleancanAddChildNode(String childNodeName, String nodeTypeName) Returnstrueif this node type allows the addition of a child node calledchildNodeNameof node typenodeTypeName.booleancanRemoveItem(String itemName) Deprecated.booleancanRemoveNode(String nodeName) Returnstrueif removing the child node callednodeNameis allowed by this node type.booleancanRemoveProperty(String propertyName) Returnstrueif removing the property calledpropertyNameis allowed by this node type.booleancanSetProperty(String propertyName, Value value) Returnstrueif settingpropertyNametovalueis allowed by this node type.booleancanSetProperty(String propertyName, Value[] values) Returnstrueif settingpropertyNametovaluesis allowed by this node type.Returns an array containing the child node definitions of this node type.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[]Returns the direct supertypes of this node type in the node type inheritance hierarchy, that is, those actually declared in this node type.Returns an array containing the property definitions of this node type.Returns all subtypes of this node type in the node type inheritance hierarchy.NodeType[]Returns all supertypes of this node type in the node type inheritance hierarchy.booleanisNodeType(String nodeTypeName) Returnstrueif 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 Details
-
NT_BASE
A constant for the node type nament:base(in expanded form). Constants for the names of the properties declared bynt:baseare:- Since:
- JCR 2.0
- See Also:
-
NT_HIERARCHY_NODE
A constant for the node type nament:hierarchyNode(in expanded form).- Since:
- JCR 2.0
- See Also:
-
NT_FOLDER
A constant for the node type nament:folder(in expanded form).- Since:
- JCR 2.0
- See Also:
-
NT_FILE
A constant for the node type nament:file(in expanded form). A constant for the name of the child node declared bynt:fileis:- Since:
- JCR 2.0
- See Also:
-
NT_LINKED_FILE
A constant for the node type nament:linkedFile(in expanded form). A constant for the name of the property declared bynt:linkedFileis:- Since:
- JCR 2.0
- See Also:
-
NT_RESOURCE
A constant for the node type nament:resource(in expanded form). A constant for the name of the property declared bynt:resourceis:- Since:
- JCR 2.0
- See Also:
-
NT_UNSTRUCTURED
A constant for the node type nament:unstructured(in expanded form).- Since:
- JCR 2.0
- See Also:
-
NT_ADDRESS
A constant for the node type nament:address(in expanded form). Constants for the names of the properties declared bynt:baseare:- Since:
- JCR 2.0
- See Also:
-
MIX_REFERENCEABLE
A constant for the node type namemix:referenceable(in expanded form). A constant for the name of the property declared bymix:referenceableis:- Since:
- JCR 2.0
- See Also:
-
MIX_TITLE
A constant for the node type namemix:title(in expanded form). Constants for the names of the properties declared bymix:titleare:- Since:
- JCR 2.0
- See Also:
-
MIX_CREATED
A constant for the node type namemix:created(in expanded form). Constants for the names of the properties declared bymix:createdare:- Since:
- JCR 2.0
- See Also:
-
MIX_LAST_MODIFIED
A constant for the node type namemix:lastModified(in expanded form). Constants for the names of the properties declared bymix:lastModifiedare:- Since:
- JCR 2.0
- See Also:
-
MIX_LANGUAGE
A constant for the node type namemix:language(in expanded form). A constant for the name of the property declared bymix:languageis:- Since:
- JCR 2.0
- See Also:
-
MIX_MIMETYPE
A constant for the node type namemix:mimeType(in expanded form). Constants for the names of the properties declared bymix:mimeTypeare:- Since:
- JCR 2.0
- See Also:
-
NT_NODE_TYPE
A constant for the node type nament:nodeType(in expanded form). Constants for the names of the child items declared bynt:nodeTypeare:- Since:
- JCR 2.0
- See Also:
-
NT_PROPERTY_DEFINITION
A constant for the node type nament:propertyDefinition(in expanded form). Constants for the names of the properties declared bynt:propertyDefinitionare:- Since:
- JCR 2.0
- See Also:
-
NT_CHILD_NODE_DEFINITION
A constant for the node type nament:childNodeDefinition(in expanded form). Constants for the names of the properties declared bynt:childNodeDefinitionare:- Since:
- JCR 2.0
- See Also:
-
MIX_SHAREABLE
A constant for the node type namemix:shareable(in expanded form).- Since:
- JCR 2.0
- See Also:
-
MIX_LOCKABLE
A constant for the node type namemix:lockable(in expanded form). Constants for the names of the properties declared bymix:lockableare:- Since:
- JCR 2.0
- See Also:
-
MIX_LIFECYCLE
A constant for the node type namemix:lifecycle(in expanded form). Constants for the names of the properties declared bymix:lifecycleare:- Since:
- JCR 2.0
- See Also:
-
MIX_SIMPLE_VERSIONABLE
A constant for the node type namemix:simpleVersionable(in expanded form). A constant for the name of the property declared bymix:simpleVersionableis:- Since:
- JCR 2.0
- See Also:
-
MIX_VERSIONABLE
A constant for the node type namemix:versionable(in expanded form). Constants for the names of the properties declared bymix:versionableare:- Since:
- JCR 2.0
- See Also:
-
NT_VERSION_HISTORY
A constant for the node type nament:versionHistory(in expanded form). Constants for the names of the child items declared bynt:versionHistoryare:- Since:
- JCR 2.0
- See Also:
-
NT_VERSION
A constant for the node type nament:version(in expanded form). Constants for the names of the child items declared bynt:versionare:- Since:
- JCR 2.0
- See Also:
-
NT_FROZEN_NODE
A constant for the node type nament:frozenNode(in expanded form). Constants for the names of the properties declared bynt:frozenNodeare:- Since:
- JCR 2.0
- See Also:
-
NT_VERSIONED_CHILD
A constant for the node type nament:versionedChild(in expanded form). A constant for the name of the property declared bynt:versionedChildis:- Since:
- JCR 2.0
- See Also:
-
NT_ACTIVITY
A constant for the node type nament:activity(in expanded form). A constant for the name of the property declared bynt:activityis:- Since:
- JCR 2.0
- See Also:
-
NT_CONFIGURATION
A constant for the node type nament:configuration(in expanded form). A constant for the name of the property declared bynt:configurationare:- Since:
- JCR 2.0
- See Also:
-
NT_QUERY
A constant for the node type nament:query(in expanded form). Constants for the names of the properties declared bynt:queryare:- Since:
- JCR 2.0
- See Also:
-
-
Method Details
-
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
NodeTypeobjects. - See Also:
-
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
NodeTypeobjects. - See Also:
-
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
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:
-
isNodeType
Returnstrueif 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:
-
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:
-
canSetProperty
Returnstrueif settingpropertyNametovalueis allowed by this node type. Otherwise returnsfalse.- Parameters:
propertyName- The name of the propertyvalue- AValueobject.- Returns:
- a boolean
-
canSetProperty
Returnstrueif settingpropertyNametovaluesis allowed by this node type. Otherwise returnsfalse.- Parameters:
propertyName- The name of the propertyvalues- AValuearray.- Returns:
- a boolean
-
canAddChildNode
Returnstrueif this node type allows the addition of a child node calledchildNodeNamewithout 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). Returnsfalseotherwise.- Parameters:
childNodeName- The name of the child node.- Returns:
- a boolean
-
canAddChildNode
Returnstrueif this node type allows the addition of a child node calledchildNodeNameof node typenodeTypeName. Returnsfalseotherwise.- Parameters:
childNodeName- The name of the child node.nodeTypeName- The name of the node type of the child node.- Returns:
- a boolean
-
canRemoveItem
Deprecated.As of JCR 2.0, clients should usecanRemoveNode(String)andcanRemoveProperty(String)instead.Returnstrueif removing the child item calleditemNameis allowed by this node type. Returnsfalseotherwise.- Parameters:
itemName- The name of the child item- Returns:
- a boolean
-
canRemoveNode
Returnstrueif removing the child node callednodeNameis allowed by this node type. Returnsfalseotherwise.- Parameters:
nodeName- The name of the child node- Returns:
- a boolean
- Since:
- JCR 2.0
-
canRemoveProperty
Returnstrueif removing the property calledpropertyNameis allowed by this node type. Returnsfalseotherwise.- Parameters:
propertyName- The name of the property- Returns:
- a boolean
- Since:
- JCR 2.0
-
canRemoveNode(String)andcanRemoveProperty(String)instead.