Package javax.jcr.nodetype
Interface NodeDefinitionTemplate
-
- All Superinterfaces:
ItemDefinition
,NodeDefinition
public interface NodeDefinitionTemplate extends NodeDefinition
TheNodeDefinitionTemplate
interface extendsNodeDefinition
with the addition of write methods, enabling the characteristics of a child node definition to be set, after which theNodeDefinitionTemplate
is added to aNodeTypeTemplate
.See the corresponding
get
methods for each attribute inNodeDefinition
for the default values assumed when a new emptyNodeDefinitionTemplate
is created (as opposed to one extracted from an existingNodeType
).- Since:
- JCR 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
setAutoCreated(boolean autoCreated)
Sets the auto-create status of the node.void
setDefaultPrimaryTypeName(java.lang.String name)
Sets the name of the default primary type of this node.void
setMandatory(boolean mandatory)
Sets the mandatory status of the node.void
setName(java.lang.String name)
Sets the name of the node.void
setOnParentVersion(int opv)
Sets the on-parent-version status of the node.void
setProtected(boolean protectedStatus)
Sets the protected status of the node.void
setRequiredPrimaryTypeNames(java.lang.String[] names)
Sets the names of the required primary types of this node.void
setSameNameSiblings(boolean allowSameNameSiblings)
Sets the same-name sibling status of this node.-
Methods inherited from interface javax.jcr.nodetype.ItemDefinition
getDeclaringNodeType, getName, getOnParentVersion, isAutoCreated, isMandatory, isProtected
-
Methods inherited from interface javax.jcr.nodetype.NodeDefinition
allowsSameNameSiblings, getDefaultPrimaryType, getDefaultPrimaryTypeName, getRequiredPrimaryTypeNames, getRequiredPrimaryTypes
-
-
-
-
Method Detail
-
setName
void setName(java.lang.String name) throws ConstraintViolationException
Sets the name of the node. This must be a JCR name in either qualified or expanded form.- Parameters:
name
- a JCR name.- Throws:
ConstraintViolationException
- ifname
is not a syntactically valid JCR name in either qualified or expanded form.
-
setAutoCreated
void setAutoCreated(boolean autoCreated)
Sets the auto-create status of the node.- Parameters:
autoCreated
- aboolean
.
-
setMandatory
void setMandatory(boolean mandatory)
Sets the mandatory status of the node.- Parameters:
mandatory
- aboolean
.
-
setOnParentVersion
void setOnParentVersion(int opv)
Sets the on-parent-version status of the node.- Parameters:
opv
- anint
constant member ofOnParentVersionAction
.
-
setProtected
void setProtected(boolean protectedStatus)
Sets the protected status of the node.- Parameters:
protectedStatus
- aboolean
.
-
setRequiredPrimaryTypeNames
void setRequiredPrimaryTypeNames(java.lang.String[] names) throws ConstraintViolationException
Sets the names of the required primary types of this node. These must be a JCR names in either qualified or expanded form.- Parameters:
names
- an array of JCR names.- Throws:
ConstraintViolationException
- ifnames
includes a name that is not a syntactically valid JCR name in either qualified or expanded form.
-
setDefaultPrimaryTypeName
void setDefaultPrimaryTypeName(java.lang.String name) throws ConstraintViolationException
Sets the name of the default primary type of this node. This must be a JCR name in either qualified or expanded form.- Parameters:
name
- a JCR name.- Throws:
ConstraintViolationException
- ifname
is not a syntactically valid JCR name in either qualified or expanded form.
-
setSameNameSiblings
void setSameNameSiblings(boolean allowSameNameSiblings)
Sets the same-name sibling status of this node.- Parameters:
allowSameNameSiblings
- aboolean
.
-
-