Package javax.jcr.nodetype
Interface PropertyDefinitionTemplate
-
- All Superinterfaces:
ItemDefinition,PropertyDefinition
public interface PropertyDefinitionTemplate extends PropertyDefinition
ThePropertyDefinitionTemplateinterface extendsPropertyDefinitionwith the addition of write methods, enabling the characteristics of a child property definition to be set, after which thePropertyDefinitionTemplateis added to aNodeTypeTemplate.See the corresponding
getmethods for each attribute inPropertyDefinitionfor the default values assumed when a new emptyPropertyDefinitionTemplateis 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 voidsetAutoCreated(boolean autoCreated)Sets the auto-create status of the property.voidsetAvailableQueryOperators(java.lang.String[] operators)Sets the queryable status of the property.voidsetDefaultValues(Value[] defaultValues)Sets the default value (or values, in the case of a multi-value property) of the property.voidsetFullTextSearchable(boolean fullTextSearchable)Sets the full-text-searchable status of the property.voidsetMandatory(boolean mandatory)Sets the mandatory status of the property.voidsetMultiple(boolean multiple)Sets the multi-value status of the property.voidsetName(java.lang.String name)Sets the name of the property.voidsetOnParentVersion(int opv)Sets the on-parent-version status of the property.voidsetProtected(boolean protectedStatus)Sets the protected status of the property.voidsetQueryOrderable(boolean queryOrderable)Sets the query-orderable status of the property.voidsetRequiredType(int type)Sets the required type of the property.voidsetValueConstraints(java.lang.String[] constraints)Sets the value constraints of the property.-
Methods inherited from interface javax.jcr.nodetype.ItemDefinition
getDeclaringNodeType, getName, getOnParentVersion, isAutoCreated, isMandatory, isProtected
-
Methods inherited from interface javax.jcr.nodetype.PropertyDefinition
getAvailableQueryOperators, getDefaultValues, getRequiredType, getValueConstraints, isFullTextSearchable, isMultiple, isQueryOrderable
-
-
-
-
Method Detail
-
setName
void setName(java.lang.String name) throws ConstraintViolationExceptionSets the name of the property. This must be a JCR name in either qualified or expanded form.- Parameters:
name- a JCR name.- Throws:
ConstraintViolationException- ifnameis not a syntactically valid JCR name in either qualified or expanded form.
-
setAutoCreated
void setAutoCreated(boolean autoCreated)
Sets the auto-create status of the property.- Parameters:
autoCreated- aboolean.
-
setMandatory
void setMandatory(boolean mandatory)
Sets the mandatory status of the property.- Parameters:
mandatory- aboolean.
-
setOnParentVersion
void setOnParentVersion(int opv)
Sets the on-parent-version status of the property.- Parameters:
opv- anintconstant member ofOnParentVersionAction.
-
setProtected
void setProtected(boolean protectedStatus)
Sets the protected status of the property.- Parameters:
protectedStatus- aboolean.
-
setRequiredType
void setRequiredType(int type)
Sets the required type of the property.- Parameters:
type- anintconstant member ofPropertyType.
-
setValueConstraints
void setValueConstraints(java.lang.String[] constraints)
Sets the value constraints of the property.- Parameters:
constraints- aStringarray.
-
setDefaultValues
void setDefaultValues(Value[] defaultValues)
Sets the default value (or values, in the case of a multi-value property) of the property.- Parameters:
defaultValues- aValuearray.
-
setMultiple
void setMultiple(boolean multiple)
Sets the multi-value status of the property.- Parameters:
multiple- aboolean.
-
setAvailableQueryOperators
void setAvailableQueryOperators(java.lang.String[] operators)
Sets the queryable status of the property.- Parameters:
operators- an array of String constants. SeePropertyDefinition.getAvailableQueryOperators().
-
setFullTextSearchable
void setFullTextSearchable(boolean fullTextSearchable)
Sets the full-text-searchable status of the property.- Parameters:
fullTextSearchable- aboolean.
-
setQueryOrderable
void setQueryOrderable(boolean queryOrderable)
Sets the query-orderable status of the property.- Parameters:
queryOrderable- aboolean.
-
-