|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@NotThreadSafe public interface NodeDefinitionTemplate
A template that can be used to create new child node definitions, patterned after the approach in the proposed JSR-283. This interface extends the standard NodeTypeDefinition
interface and adds setter methods for the various attributes.
NodeTypeDefinition.getDeclaredNodeDefinitions()
Method Summary | |
---|---|
void |
setAutoCreated(boolean autoCreated)
Set whether this definition describes a child node that is auto-created by the system. |
void |
setDefaultPrimaryType(String defaultPrimaryType)
Set the name of the primary type that should be used by default when creating children using this node definition. |
void |
setMandatory(boolean mandatory)
Set whether this definition describes a child that is required (mandatory). |
void |
setName(String name)
Set the name of this child node definition. |
void |
setOnParentVersion(int opv)
Set the mode for the versioning of the child with respect to versioning of the parent. |
void |
setProtected(boolean isProtected)
Set whether the child node described by this definition is protected from changes through the JCR API. |
void |
setRequiredPrimaryTypes(String[] requiredPrimaryTypes)
Set the names of the primary types that must appear on the child(ren) described by this definition |
void |
setSameNameSiblings(boolean allowSameNameSiblings)
Set whether the children described by this definition may have the same names (and therefore distinguished only by their same-name-sibiling index ). |
Methods inherited from interface javax.jcr.nodetype.NodeDefinition |
---|
allowsSameNameSiblings, getDefaultPrimaryType, getRequiredPrimaryTypes |
Methods inherited from interface javax.jcr.nodetype.ItemDefinition |
---|
getDeclaringNodeType, getName, getOnParentVersion, isAutoCreated, isMandatory, isProtected |
Method Detail |
---|
void setName(String name)
name
- the name for this child node definition.void setAutoCreated(boolean autoCreated)
autoCreated
- true if this child should be auto-createdvoid setMandatory(boolean mandatory)
mandatory
- true if the child is mandatoryvoid setOnParentVersion(int opv)
opv
- the on-parent versioning mode; one of OnParentVersionAction
values.void setProtected(boolean isProtected)
isProtected
- true if the child node is protected, or false if it may be changed through the JCR APIvoid setRequiredPrimaryTypes(String[] requiredPrimaryTypes)
requiredPrimaryTypes
- the names of the required primary types, or null or empty if there are no requirements for the
primary types of the children described by this definitionvoid setDefaultPrimaryType(String defaultPrimaryType)
defaultPrimaryType
- the name of the primary type that should be used by default, or null if there is nonevoid setSameNameSiblings(boolean allowSameNameSiblings)
same-name-sibiling index
).
allowSameNameSiblings
- true if the children described by this definition may have the same names, or false otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |