|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@NotThreadSafe public interface PropertyDefinitionTemplate
A template that can be used to create new property definitions, patterned after the approach in the proposed JSR-283. This interface extends the standard PropertyDefinition
interface and adds setter methods for the various attributes.
NodeTypeDefinition.getDeclaredPropertyDefinitions()
Method Summary | |
---|---|
void |
setAutoCreated(boolean autoCreated)
Set whether this definition describes a child node that is auto-created by the system. |
void |
setDefaultValues(String[] defaultValues)
Set the default values for the property, using their string representation. |
void |
setMandatory(boolean mandatory)
Set whether this definition describes a child that is required (mandatory). |
void |
setMultiple(boolean multiple)
Set whether the properties described by this definition may have multiple values. |
void |
setName(String name)
Set the name of the property 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 |
setRequiredType(int requiredType)
Set the required property type for the values of the property, or PropertyType.UNDEFINED if there is no type
requirement |
void |
setValueConstraints(String[] constraints)
Set the constraint expressions for the values of the property. |
Methods inherited from interface javax.jcr.nodetype.PropertyDefinition |
---|
getDefaultValues, getRequiredType, getValueConstraints, isMultiple |
Methods inherited from interface javax.jcr.nodetype.ItemDefinition |
---|
getDeclaringNodeType, getName, getOnParentVersion, isAutoCreated, isMandatory, isProtected |
Method Detail |
---|
void setName(String name)
name
- the namevoid 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 setRequiredType(int requiredType)
PropertyType.UNDEFINED
if there is no type
requirement
requiredType
- the required type for the property valuesvoid setValueConstraints(String[] constraints)
PropertyDefinition.getValueConstraints()
for
more details about the formats of the constraints.
constraints
- the value constraints, or null or an empty array if there are no constraints.void setDefaultValues(String[] defaultValues)
PropertyDefinition.getDefaultValues()
for more details.
defaultValues
- the string representation of the default values, or null or an empty array if there are no default
valuesvoid setMultiple(boolean multiple)
multiple
- true if the properties may have multiple values, or false if they are limited to one value each
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |