|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NodeType
A NodeType
object represents a "live" node type that is
registered in the repository.
Field Summary | |
---|---|
static java.lang.String |
MIX_CREATED
A constant for the node type name mix:created (in expanded
form). |
static java.lang.String |
MIX_LANGUAGE
A constant for the node type name mix:language (in expanded
form). |
static java.lang.String |
MIX_LAST_MODIFIED
A constant for the node type name mix:lastModified (in
expanded form). |
static java.lang.String |
MIX_LIFECYCLE
A constant for the node type name mix:lifecycle (in expanded
form). |
static java.lang.String |
MIX_LOCKABLE
A constant for the node type name mix:lockable (in expanded
form). |
static java.lang.String |
MIX_MIMETYPE
A constant for the node type name mix:mimeType (in expanded
form). |
static java.lang.String |
MIX_REFERENCEABLE
A constant for the node type name mix:referenceable (in
expanded form). |
static java.lang.String |
MIX_SHAREABLE
A constant for the node type name mix:shareable (in expanded
form). |
static java.lang.String |
MIX_SIMPLE_VERSIONABLE
A constant for the node type name mix:simpleVersionable (in
expanded form). |
static java.lang.String |
MIX_TITLE
A constant for the node type name mix:title (in expanded
form). |
static java.lang.String |
MIX_VERSIONABLE
A constant for the node type name mix:versionable (in
expanded form). |
static java.lang.String |
NT_ACTIVITY
A constant for the node type name nt:activity (in expanded
form). |
static java.lang.String |
NT_ADDRESS
A constant for the node type name nt:address (in expanded
form). |
static java.lang.String |
NT_BASE
A constant for the node type name nt:base (in expanded
form). |
static java.lang.String |
NT_CHILD_NODE_DEFINITION
A constant for the node type name nt:childNodeDefinition (in
expanded form). |
static java.lang.String |
NT_CONFIGURATION
A constant for the node type name nt:configuration (in
expanded form). |
static java.lang.String |
NT_FILE
A constant for the node type name nt:file (in expanded
form). |
static java.lang.String |
NT_FOLDER
A constant for the node type name nt:folder (in expanded
form). |
static java.lang.String |
NT_FROZEN_NODE
A constant for the node type name nt:frozenNode (in expanded
form). |
static java.lang.String |
NT_HIERARCHY_NODE
A constant for the node type name nt:hierarchyNode (in
expanded form). |
static java.lang.String |
NT_LINKED_FILE
A constant for the node type name nt:linkedFile (in expanded
form). |
static java.lang.String |
NT_NODE_TYPE
A constant for the node type name nt:nodeType (in expanded
form). |
static java.lang.String |
NT_PROPERTY_DEFINITION
A constant for the node type name nt:propertyDefinition (in
expanded form). |
static java.lang.String |
NT_QUERY
A constant for the node type name nt:query (in expanded
form). |
static java.lang.String |
NT_RESOURCE
A constant for the node type name nt:resource (in expanded
form). |
static java.lang.String |
NT_UNSTRUCTURED
A constant for the node type name nt:unstructured (in
expanded form). |
static java.lang.String |
NT_VERSION
A constant for the node type name nt:version (in expanded
form). |
static java.lang.String |
NT_VERSION_HISTORY
A constant for the node type name nt:versionHistory (in
expanded form). |
static java.lang.String |
NT_VERSIONED_CHILD
A constant for the node type name nt:versionedChild (in
expanded form). |
Method Summary | |
---|---|
boolean |
canAddChildNode(java.lang.String childNodeName)
Returns true if this node type allows the addition of a
child node called childNodeName 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)
Returns true if this node type allows the addition of a
child node called childNodeName of node type
nodeTypeName . |
boolean |
canRemoveItem(java.lang.String itemName)
Deprecated. As of JCR 2.0, clients should use canRemoveNode(String)
and canRemoveProperty(String) instead. |
boolean |
canRemoveNode(java.lang.String nodeName)
Returns true if removing the child node called
nodeName is allowed by this node type. |
boolean |
canRemoveProperty(java.lang.String propertyName)
Returns true if removing the property called
propertyName is allowed by this node type. |
boolean |
canSetProperty(java.lang.String propertyName,
Value value)
Returns true if setting propertyName to
value is allowed by this node type. |
boolean |
canSetProperty(java.lang.String propertyName,
Value[] values)
Returns true if setting propertyName to
values 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)
Returns true if the name of this node type or any of
its direct or indirect supertypes is equal to nodeTypeName ,
otherwise returns false . |
Methods inherited from interface javax.jcr.nodetype.NodeTypeDefinition |
---|
getDeclaredChildNodeDefinitions, getDeclaredPropertyDefinitions, getDeclaredSupertypeNames, getName, getPrimaryItemName, hasOrderableChildNodes, isAbstract, isMixin, isQueryable |
Field Detail |
---|
static final java.lang.String NT_BASE
nt:base
(in expanded
form). Constants for the names of the properties declared by
nt:base
are:
static final java.lang.String NT_HIERARCHY_NODE
nt:hierarchyNode
(in
expanded form).
static final java.lang.String NT_FOLDER
nt:folder
(in expanded
form).
static final java.lang.String NT_FILE
nt:file
(in expanded
form). A constant for the name of the child node declared by
nt:file
is:
static final java.lang.String NT_LINKED_FILE
nt:linkedFile
(in expanded
form). A constant for the name of the property declared by
nt:linkedFile
is:
static final java.lang.String NT_RESOURCE
nt:resource
(in expanded
form). A constant for the name of the property declared by
nt:resource
is:
static final java.lang.String NT_UNSTRUCTURED
nt:unstructured
(in
expanded form).
static final java.lang.String NT_ADDRESS
nt:address
(in expanded
form). Constants for the names of the properties declared by
nt:base
are: Property.JCR_PROTOCOL
Property.JCR_HOST
Property.JCR_PORT
Property.JCR_REPOSITORY
Property.JCR_WORKSPACE
Property.JCR_PATH
Property.JCR_ID
static final java.lang.String MIX_REFERENCEABLE
mix:referenceable
(in
expanded form). A constant for the name of the property declared by
mix:referenceable
is:
static final java.lang.String MIX_TITLE
mix:title
(in expanded
form). Constants for the names of the properties declared by
mix:title
are:
static final java.lang.String MIX_CREATED
mix:created
(in expanded
form). Constants for the names of the properties declared by
mix:created
are:
static final java.lang.String MIX_LAST_MODIFIED
mix:lastModified
(in
expanded form). Constants for the names of the properties declared by
mix:lastModified
are:
static final java.lang.String MIX_LANGUAGE
mix:language
(in expanded
form). A constant for the name of the property declared by
mix:language
is:
static final java.lang.String MIX_MIMETYPE
mix:mimeType
(in expanded
form). Constants for the names of the properties declared by
mix:mimeType
are:
static final java.lang.String NT_NODE_TYPE
nt:nodeType
(in expanded
form). Constants for the names of the child items declared by
nt:nodeType
are: Property.JCR_NODE_TYPE_NAME
Property.JCR_SUPERTYPES
Property.JCR_IS_ABSTRACT
Property.JCR_IS_MIXIN
Property.JCR_HAS_ORDERABLE_CHILD_NODES
Property.JCR_PRIMARY_ITEM_NAME
Node.JCR_PROPERTY_DEFINITION
Node.JCR_CHILD_NODE_DEFINITION
static final java.lang.String NT_PROPERTY_DEFINITION
nt:propertyDefinition
(in
expanded form). Constants for the names of the properties declared by
nt:propertyDefinition
are: Property.JCR_NAME
Property.JCR_AUTOCREATED
Property.JCR_MANDATORY
Property.JCR_PROTECTED
Property.JCR_ON_PARENT_VERSION
Property.JCR_REQUIRED_TYPE
Property.JCR_VALUE_CONSTRAINTS
Property.JCR_DEFAULT_VALUES
Property.JCR_MULTIPLE
static final java.lang.String NT_CHILD_NODE_DEFINITION
nt:childNodeDefinition
(in
expanded form). Constants for the names of the properties declared by
nt:childNodeDefinition
are: Property.JCR_NAME
Property.JCR_AUTOCREATED
Property.JCR_MANDATORY
Property.JCR_PROTECTED
Property.JCR_ON_PARENT_VERSION
Property.JCR_REQUIRED_PRIMARY_TYPES
Property.JCR_DEFAULT_PRIMARY_TYPE
Property.JCR_SAME_NAME_SIBLINGS
static final java.lang.String MIX_SHAREABLE
mix:shareable
(in expanded
form).
static final java.lang.String MIX_LOCKABLE
mix:lockable
(in expanded
form). Constants for the names of the properties declared by
mix:lockable
are:
static final java.lang.String MIX_LIFECYCLE
mix:lifecycle
(in expanded
form). Constants for the names of the properties declared by
mix:lifecycle
are:
static final java.lang.String MIX_SIMPLE_VERSIONABLE
mix:simpleVersionable
(in
expanded form). A constant for the name of the property declared by
mix:simpleVersionable
is:
static final java.lang.String MIX_VERSIONABLE
mix:versionable
(in
expanded form). Constants for the names of the properties declared by
mix:versionable
are: Property.JCR_VERSION_HISTORY
Property.JCR_BASE_VERSION
Property.JCR_PREDECESSORS
Property.JCR_MERGE_FAILED
Property.JCR_ACTIVITY
Property.JCR_CONFIGURATION
static final java.lang.String NT_VERSION_HISTORY
nt:versionHistory
(in
expanded form). Constants for the names of the child items declared by
nt:versionHistory
are: Property.JCR_VERSIONABLE_UUID
Property.JCR_COPIED_FROM
Node.JCR_ROOT_VERSION
Node.JCR_VERSION_LABELS
static final java.lang.String NT_VERSION
nt:version
(in expanded
form). Constants for the names of the child items declared by
nt:version
are: Property.JCR_CREATED
Property.JCR_PREDECESSORS
Property.JCR_SUCCESSORS
Property.JCR_ACTIVITY
Node.JCR_FROZEN_NODE
static final java.lang.String NT_FROZEN_NODE
nt:frozenNode
(in expanded
form). Constants for the names of the properties declared by
nt:frozenNode
are:
static final java.lang.String NT_VERSIONED_CHILD
nt:versionedChild
(in
expanded form). A constant for the name of the property declared by
nt:versionedChild
is:
static final java.lang.String NT_ACTIVITY
nt:activity
(in expanded
form). A constant for the name of the property declared by
nt:activity
is:
static final java.lang.String NT_CONFIGURATION
nt:configuration
(in
expanded form). A constant for the name of the property declared by
nt:configuration
are:
static final java.lang.String NT_QUERY
nt:query
(in expanded
form). Constants for the names of the properties declared by
nt:query
are:
Method Detail |
---|
NodeType[] getSupertypes()
nt:base
, this list
will always include at least nt:base
. For mixin types, there
is no required supertype.
NodeType
objects.getDeclaredSupertypes()
NodeType[] getDeclaredSupertypes()
NodeType
objects.getSupertypes()
NodeTypeIterator getSubtypes()
NodeTypeIterator
.getDeclaredSubtypes()
NodeTypeIterator getDeclaredSubtypes()
NodeTypeIterator
.getSubtypes()
boolean isNodeType(java.lang.String nodeTypeName)
true
if the name of this node type or any of
its direct or indirect supertypes is equal to nodeTypeName
,
otherwise returns false
.
nodeTypeName
- the name of a node type.
PropertyDefinition[] getPropertyDefinitions()
NodeTypeDefinition.getDeclaredPropertyDefinitions()
NodeDefinition[] getChildNodeDefinitions()
NodeTypeDefinition.getDeclaredChildNodeDefinitions()
boolean canSetProperty(java.lang.String propertyName, Value value)
true
if setting propertyName
to
value
is allowed by this node type. Otherwise returns
false
.
propertyName
- The name of the propertyvalue
- A Value
object.
boolean canSetProperty(java.lang.String propertyName, Value[] values)
true
if setting propertyName
to
values
is allowed by this node type. Otherwise returns
false
.
propertyName
- The name of the propertyvalues
- A Value
array.
boolean canAddChildNode(java.lang.String childNodeName)
true
if this node type allows the addition of a
child node called childNodeName
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).
Returns false
otherwise.
childNodeName
- The name of the child node.
boolean canAddChildNode(java.lang.String childNodeName, java.lang.String nodeTypeName)
true
if this node type allows the addition of a
child node called childNodeName
of node type
nodeTypeName
. Returns false
otherwise.
childNodeName
- The name of the child node.nodeTypeName
- The name of the node type of the child node.
boolean canRemoveItem(java.lang.String itemName)
canRemoveNode(String)
and canRemoveProperty(String)
instead.
true
if removing the child item called
itemName
is allowed by this node type. Returns
false
otherwise.
itemName
- The name of the child item
boolean canRemoveNode(java.lang.String nodeName)
true
if removing the child node called
nodeName
is allowed by this node type. Returns
false
otherwise.
nodeName
- The name of the child node
boolean canRemoveProperty(java.lang.String propertyName)
true
if removing the property called
propertyName
is allowed by this node type. Returns
false
otherwise.
propertyName
- The name of the property
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |