org.apache.jackrabbit.api.jsr283.nodetype
Interface PropertyDefinitionTemplate

All Superinterfaces:
ItemDefinition, PropertyDefinition

public interface PropertyDefinitionTemplate
extends PropertyDefinition

The PropertyDefinitionTemplate interface extends PropertyDefinition with the addition of write methods, enabling the characteristics of a child property definition to be set, after which the PropertyDefinitionTemplate is added to a NodeTypeTemplate.

See the corresponding get methods for each attribute in PropertyDefinition for the default values assumed when a new empty PropertyDefinitionTemplate is created (as opposed to one extracted from an existing NodeType).

Since:
JCR 2.0

Method Summary
 void setAutoCreated(boolean autoCreated)
          Sets the auto-create status of the property.
 void setDefaultValues(Value[] defaultValues)
          Sets the default value (or values, in the case of a multi-value property) of the property.
 void setMandatory(boolean mandatory)
          Sets the mandatory status of the property.
 void setMultiple(boolean multiple)
          Sets the multi-value status of the property.
 void setName(String name)
          Sets the name of the property.
 void setOnParentVersion(int opv)
          Sets the on-parent-version status of the property.
 void setProtected(boolean protectedStatus)
          Sets the protected status of the property.
 void setRequiredType(int type)
          Sets the required type of the property.
 void setValueConstraints(String[] constraints)
          Sets the value constraints 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

setName

void setName(String name)
Sets the name of the property.

Parameters:
name - a String.

setAutoCreated

void setAutoCreated(boolean autoCreated)
Sets the auto-create status of the property.

Parameters:
autoCreated - a boolean.

setMandatory

void setMandatory(boolean mandatory)
Sets the mandatory status of the property.

Parameters:
mandatory - a boolean.

setOnParentVersion

void setOnParentVersion(int opv)
Sets the on-parent-version status of the property.

Parameters:
opv - an int constant member of OnParentVersionAction.

setProtected

void setProtected(boolean protectedStatus)
Sets the protected status of the property.

Parameters:
protectedStatus - a boolean.

setRequiredType

void setRequiredType(int type)
Sets the required type of the property.

Parameters:
type - an int constant member of PropertyType.

setValueConstraints

void setValueConstraints(String[] constraints)
Sets the value constraints of the property.

Parameters:
constraints - a String array.

setDefaultValues

void setDefaultValues(Value[] defaultValues)
Sets the default value (or values, in the case of a multi-value property) of the property.

Parameters:
defaultValues - a Value array.

setMultiple

void setMultiple(boolean multiple)
Sets the multi-value status of the property.

Parameters:
multiple - a boolean.


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.