Class TemplateBuilderFactory.PropertyDefinitionTemplateBuilder
- java.lang.Object
-
- org.apache.jackrabbit.commons.cnd.DefinitionBuilderFactory.AbstractItemDefinitionBuilder<T>
-
- org.apache.jackrabbit.commons.cnd.DefinitionBuilderFactory.AbstractPropertyDefinitionBuilder<NodeTypeTemplate>
-
- org.apache.jackrabbit.commons.cnd.TemplateBuilderFactory.PropertyDefinitionTemplateBuilder
-
- Enclosing class:
- TemplateBuilderFactory
public class TemplateBuilderFactory.PropertyDefinitionTemplateBuilder extends DefinitionBuilderFactory.AbstractPropertyDefinitionBuilder<NodeTypeTemplate>
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.commons.cnd.DefinitionBuilderFactory.AbstractPropertyDefinitionBuilder
fullTextSearchable, isMultiple, queryOperators, queryOrderable, requiredType
-
Fields inherited from class org.apache.jackrabbit.commons.cnd.DefinitionBuilderFactory.AbstractItemDefinitionBuilder
autocreate, isMandatory, isProtected, name, onParent
-
-
Constructor Summary
Constructors Constructor Description PropertyDefinitionTemplateBuilder(TemplateBuilderFactory.NodeTypeTemplateBuilder ntd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDefaultValues(String value)
void
addValueConstraint(String constraint)
void
build()
Build this item definition an add it to its parent node type definitionvoid
setDeclaringNodeType(String name)
void
setName(String name)
-
Methods inherited from class org.apache.jackrabbit.commons.cnd.DefinitionBuilderFactory.AbstractPropertyDefinitionBuilder
getRequiredType, setAvailableQueryOperators, setFullTextSearchable, setMultiple, setQueryOrderable, setRequiredType
-
Methods inherited from class org.apache.jackrabbit.commons.cnd.DefinitionBuilderFactory.AbstractItemDefinitionBuilder
getName, setAutoCreated, setMandatory, setOnParentVersion, setProtected
-
-
-
-
Constructor Detail
-
PropertyDefinitionTemplateBuilder
public PropertyDefinitionTemplateBuilder(TemplateBuilderFactory.NodeTypeTemplateBuilder ntd) throws UnsupportedRepositoryOperationException, RepositoryException
-
-
Method Detail
-
setName
public void setName(String name) throws RepositoryException
- Overrides:
setName
in classDefinitionBuilderFactory.AbstractItemDefinitionBuilder<NodeTypeTemplate>
- Parameters:
name
- the name of the child item definition being build- Throws:
RepositoryException
- See Also:
ItemDefinition.getName()
-
addDefaultValues
public void addDefaultValues(String value) throws ValueFormatException
- Specified by:
addDefaultValues
in classDefinitionBuilderFactory.AbstractPropertyDefinitionBuilder<NodeTypeTemplate>
- Parameters:
value
- add a default value to the list of default values of the property definition being built.- Throws:
ValueFormatException
- See Also:
PropertyDefinition.getDefaultValues()
-
addValueConstraint
public void addValueConstraint(String constraint)
- Specified by:
addValueConstraint
in classDefinitionBuilderFactory.AbstractPropertyDefinitionBuilder<NodeTypeTemplate>
- Parameters:
constraint
- add a value constraint to the list of value constraints of the property definition being built.- See Also:
PropertyDefinition.getValueConstraints()
-
setDeclaringNodeType
public void setDeclaringNodeType(String name)
- Specified by:
setDeclaringNodeType
in classDefinitionBuilderFactory.AbstractItemDefinitionBuilder<NodeTypeTemplate>
- Parameters:
name
- the name of the declaring node type.- See Also:
ItemDefinition.getDeclaringNodeType()
-
build
public void build() throws IllegalStateException
Description copied from class:DefinitionBuilderFactory.AbstractItemDefinitionBuilder
Build this item definition an add it to its parent node type definition- Specified by:
build
in classDefinitionBuilderFactory.AbstractItemDefinitionBuilder<NodeTypeTemplate>
- Throws:
IllegalStateException
-
-