Package javax.jcr.nodetype
Interface NodeType
-
- All Superinterfaces:
NodeTypeDefinition
- All Known Implementing Classes:
AbstractNodeType
public interface NodeType extends NodeTypeDefinition
ANodeTypeobject represents a "live" node type that is registered in the repository.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMIX_CREATEDA constant for the node type namemix:created(in expanded form).static java.lang.StringMIX_LANGUAGEA constant for the node type namemix:language(in expanded form).static java.lang.StringMIX_LAST_MODIFIEDA constant for the node type namemix:lastModified(in expanded form).static java.lang.StringMIX_LIFECYCLEA constant for the node type namemix:lifecycle(in expanded form).static java.lang.StringMIX_LOCKABLEA constant for the node type namemix:lockable(in expanded form).static java.lang.StringMIX_MIMETYPEA constant for the node type namemix:mimeType(in expanded form).static java.lang.StringMIX_REFERENCEABLEA constant for the node type namemix:referenceable(in expanded form).static java.lang.StringMIX_SHAREABLEA constant for the node type namemix:shareable(in expanded form).static java.lang.StringMIX_SIMPLE_VERSIONABLEA constant for the node type namemix:simpleVersionable(in expanded form).static java.lang.StringMIX_TITLEA constant for the node type namemix:title(in expanded form).static java.lang.StringMIX_VERSIONABLEA constant for the node type namemix:versionable(in expanded form).static java.lang.StringNT_ACTIVITYA constant for the node type nament:activity(in expanded form).static java.lang.StringNT_ADDRESSA constant for the node type nament:address(in expanded form).static java.lang.StringNT_BASEA constant for the node type nament:base(in expanded form).static java.lang.StringNT_CHILD_NODE_DEFINITIONA constant for the node type nament:childNodeDefinition(in expanded form).static java.lang.StringNT_CONFIGURATIONA constant for the node type nament:configuration(in expanded form).static java.lang.StringNT_FILEA constant for the node type nament:file(in expanded form).static java.lang.StringNT_FOLDERA constant for the node type nament:folder(in expanded form).static java.lang.StringNT_FROZEN_NODEA constant for the node type nament:frozenNode(in expanded form).static java.lang.StringNT_HIERARCHY_NODEA constant for the node type nament:hierarchyNode(in expanded form).static java.lang.StringNT_LINKED_FILEA constant for the node type nament:linkedFile(in expanded form).static java.lang.StringNT_NODE_TYPEA constant for the node type nament:nodeType(in expanded form).static java.lang.StringNT_PROPERTY_DEFINITIONA constant for the node type nament:propertyDefinition(in expanded form).static java.lang.StringNT_QUERYA constant for the node type nament:query(in expanded form).static java.lang.StringNT_RESOURCEA constant for the node type nament:resource(in expanded form).static java.lang.StringNT_UNSTRUCTUREDA constant for the node type nament:unstructured(in expanded form).static java.lang.StringNT_VERSIONA constant for the node type nament:version(in expanded form).static java.lang.StringNT_VERSION_HISTORYA constant for the node type nament:versionHistory(in expanded form).static java.lang.StringNT_VERSIONED_CHILDA 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 booleancanAddChildNode(java.lang.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(java.lang.String childNodeName, java.lang.String nodeTypeName)Returnstrueif this node type allows the addition of a child node calledchildNodeNameof node typenodeTypeName.booleancanRemoveItem(java.lang.String itemName)Deprecated.As of JCR 2.0, clients should usecanRemoveNode(String)andcanRemoveProperty(String)instead.booleancanRemoveNode(java.lang.String nodeName)Returnstrueif removing the child node callednodeNameis allowed by this node type.booleancanRemoveProperty(java.lang.String propertyName)Returnstrueif removing the property calledpropertyNameis allowed by this node type.booleancanSetProperty(java.lang.String propertyName, Value value)Returnstrueif settingpropertyNametovalueis allowed by this node type.booleancanSetProperty(java.lang.String propertyName, Value[] values)Returnstrueif settingpropertyNametovaluesis allowed by this node type.NodeDefinition[]getChildNodeDefinitions()Returns an array containing the child node definitions of this node type.NodeTypeIteratorgetDeclaredSubtypes()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.NodeTypeIteratorgetSubtypes()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.booleanisNodeType(java.lang.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 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:baseare:- 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:fileis:- 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:linkedFileis:- 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:resourceis:- 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:baseare:- 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:referenceableis:- 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:titleare:- 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:createdare:- 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:lastModifiedare:- 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:languageis:- 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:mimeTypeare:- 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:nodeTypeare:- 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:propertyDefinitionare:- 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:childNodeDefinitionare:- 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:lockableare:- 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:lifecycleare:- 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:simpleVersionableis:- 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:versionableare:- 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:versionHistoryare:- 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:versionare:- 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:frozenNodeare:- 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:versionedChildis:- 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:activityis:- 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:configurationare:- 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:queryare:- 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
NodeTypeobjects. - 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
NodeTypeobjects. - 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)
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:
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)Returnstrueif settingpropertyNametovalueis allowed by this node type. Otherwise returnsfalse.- Parameters:
propertyName- The name of the propertyvalue- AValueobject.- Returns:
- a boolean
-
canSetProperty
boolean canSetProperty(java.lang.String propertyName, Value[] values)Returnstrueif settingpropertyNametovaluesis allowed by this node type. Otherwise returnsfalse.- Parameters:
propertyName- The name of the propertyvalues- AValuearray.- Returns:
- a boolean
-
canAddChildNode
boolean canAddChildNode(java.lang.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). Returnsfalseotherwise.- Parameters:
childNodeName- The name of the child node.- Returns:
- a boolean
-
canAddChildNode
boolean canAddChildNode(java.lang.String childNodeName, java.lang.String nodeTypeName)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
boolean canRemoveItem(java.lang.String itemName)
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
boolean canRemoveNode(java.lang.String nodeName)
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
boolean canRemoveProperty(java.lang.String propertyName)
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
-
-