Class ItemInfoBuilder.PropertyInfoBuilder
- java.lang.Object
 - 
- org.apache.jackrabbit.spi.commons.ItemInfoBuilder.PropertyInfoBuilder
 
 
- 
- Enclosing class:
 - ItemInfoBuilder
 
public static class ItemInfoBuilder.PropertyInfoBuilder extends java.lang.ObjectBuilder forPropertyInfos. UseItemInfoBuilder.NodeInfoBuilder.createPropertyInfo(String)to create an instance of this class. 
- 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemInfoBuilder.PropertyInfoBuilderaddValue(boolean value)Add aPropertyType.BOOLEANvalue to this property.ItemInfoBuilder.PropertyInfoBuilderaddValue(byte[] value)Add aPropertyType.BINARYvalue to this property.ItemInfoBuilder.PropertyInfoBuilderaddValue(double value)Add aPropertyType.DOUBLEvalue to this property.ItemInfoBuilder.PropertyInfoBuilderaddValue(long value)Add aPropertyType.LONGvalue to this property.ItemInfoBuilder.PropertyInfoBuilderaddValue(java.io.File value)Add aPropertyType.BINARYvalue to this property.ItemInfoBuilder.PropertyInfoBuilderaddValue(java.io.InputStream value)Add aPropertyType.BINARYvalue to this property.ItemInfoBuilder.PropertyInfoBuilderaddValue(java.lang.String value)Add aPropertyType.STRINGvalue to this property.ItemInfoBuilder.PropertyInfoBuilderaddValue(java.math.BigDecimal value)Add aPropertyType.DECIMALvalue to this property.ItemInfoBuilder.PropertyInfoBuilderaddValue(java.net.URI value)Add aPropertyType.URIvalue to this property.ItemInfoBuilder.PropertyInfoBuilderaddValue(java.util.Calendar value)Add aPropertyType.DATEvalue to this property.ItemInfoBuilder.PropertyInfoBuilderaddValue(Name value)Add aPropertyType.NAMEvalue to this property.ItemInfoBuilder.PropertyInfoBuilderaddValue(Path value)Add aPropertyType.PATHvalue to this property.ItemInfoBuilder.PropertyInfoBuilderaddValue(QValue value)Add avalueto this property.ItemInfoBuilder.NodeInfoBuilderbuild()Build thePropertyInfo.ItemInfoBuilder.NodeInfoBuildergetParent()PropertyInfogetPropertyInfo()Returns thePropertyInfowhich has been built by this builder.ItemInfoBuilder.PropertyInfoBuildersetMultivalued(boolean on)Set this property to multi-values.ItemInfoBuilder.PropertyInfoBuildersetName(java.lang.String localName)Set thelocalNameof this propertyItemInfoBuilder.PropertyInfoBuildersetName(Name name)Set thenameof this propertyItemInfoBuilder.PropertyInfoBuildersetNamespace(java.lang.String namespace)Set the namespaceItemInfoBuilder.PropertyInfoBuildersetType(int type)Set theof this propertytype 
 - 
 
- 
- 
Method Detail
- 
setName
public ItemInfoBuilder.PropertyInfoBuilder setName(Name name)
Set thenameof this property- Parameters:
 name-- Returns:
 
 
- 
setName
public ItemInfoBuilder.PropertyInfoBuilder setName(java.lang.String localName)
Set thelocalNameof this property- Parameters:
 localName-- Returns:
 
 
- 
setNamespace
public ItemInfoBuilder.PropertyInfoBuilder setNamespace(java.lang.String namespace)
Set the namespace- Parameters:
 namespace-- Returns:
 
 
- 
setType
public ItemInfoBuilder.PropertyInfoBuilder setType(int type)
Set theof this propertytype- Parameters:
 type-- Returns:
 this- Throws:
 java.lang.IllegalStateException- if a property of a different type has been added before.
 
- 
addValue
public ItemInfoBuilder.PropertyInfoBuilder addValue(QValue value)
Add avalueto this property. Sets this property to single valued if this is the first value. Otherwise sets this property to multi-valued.- Parameters:
 value-- Returns:
 this- Throws:
 java.lang.IllegalStateException- if the type of the value does not match the type of this property
 
- 
addValue
public ItemInfoBuilder.PropertyInfoBuilder addValue(java.lang.String value) throws javax.jcr.RepositoryException
Add aPropertyType.STRINGvalue to this property.- Parameters:
 value-- Returns:
 this- Throws:
 javax.jcr.RepositoryExceptionjava.lang.IllegalStateException- if the type of the value does not match the type of this property
 
- 
addValue
public ItemInfoBuilder.PropertyInfoBuilder addValue(java.util.Calendar value) throws javax.jcr.RepositoryException
Add aPropertyType.DATEvalue to this property.- Parameters:
 value-- Returns:
 this- Throws:
 javax.jcr.RepositoryExceptionjava.lang.IllegalStateException- if the type of the value does not match the type of this property
 
- 
addValue
public ItemInfoBuilder.PropertyInfoBuilder addValue(double value) throws javax.jcr.RepositoryException
Add aPropertyType.DOUBLEvalue to this property.- Parameters:
 value-- Returns:
 this- Throws:
 javax.jcr.RepositoryExceptionjava.lang.IllegalStateException- if the type of the value does not match the type of this property
 
- 
addValue
public ItemInfoBuilder.PropertyInfoBuilder addValue(long value) throws javax.jcr.RepositoryException
Add aPropertyType.LONGvalue to this property.- Parameters:
 value-- Returns:
 this- Throws:
 javax.jcr.RepositoryExceptionjava.lang.IllegalStateException- if the type of the value does not match the type of this property
 
- 
addValue
public ItemInfoBuilder.PropertyInfoBuilder addValue(boolean value) throws javax.jcr.RepositoryException
Add aPropertyType.BOOLEANvalue to this property.- Parameters:
 value-- Returns:
 this- Throws:
 javax.jcr.RepositoryExceptionjava.lang.IllegalStateException- if the type of the value does not match the type of this property
 
- 
addValue
public ItemInfoBuilder.PropertyInfoBuilder addValue(Name value) throws javax.jcr.RepositoryException
Add aPropertyType.NAMEvalue to this property.- Parameters:
 value-- Returns:
 this- Throws:
 javax.jcr.RepositoryExceptionjava.lang.IllegalStateException- if the type of the value does not match the type of this property
 
- 
addValue
public ItemInfoBuilder.PropertyInfoBuilder addValue(Path value) throws javax.jcr.RepositoryException
Add aPropertyType.PATHvalue to this property.- Parameters:
 value-- Returns:
 this- Throws:
 javax.jcr.RepositoryExceptionjava.lang.IllegalStateException- if the type of the value does not match the type of this property
 
- 
addValue
public ItemInfoBuilder.PropertyInfoBuilder addValue(java.math.BigDecimal value) throws javax.jcr.RepositoryException
Add aPropertyType.DECIMALvalue to this property.- Parameters:
 value-- Returns:
 this- Throws:
 javax.jcr.RepositoryExceptionjava.lang.IllegalStateException- if the type of the value does not match the type of this property
 
- 
addValue
public ItemInfoBuilder.PropertyInfoBuilder addValue(java.net.URI value) throws javax.jcr.RepositoryException
Add aPropertyType.URIvalue to this property.- Parameters:
 value-- Returns:
 this- Throws:
 javax.jcr.RepositoryExceptionjava.lang.IllegalStateException- if the type of the value does not match the type of this property
 
- 
addValue
public ItemInfoBuilder.PropertyInfoBuilder addValue(byte[] value) throws javax.jcr.RepositoryException
Add aPropertyType.BINARYvalue to this property.- Parameters:
 value-- Returns:
 this- Throws:
 javax.jcr.RepositoryExceptionjava.lang.IllegalStateException- if the type of the value does not match the type of this property
 
- 
addValue
public ItemInfoBuilder.PropertyInfoBuilder addValue(java.io.InputStream value) throws javax.jcr.RepositoryException, java.io.IOException
Add aPropertyType.BINARYvalue to this property.- Parameters:
 value-- Returns:
 this- Throws:
 javax.jcr.RepositoryExceptionjava.lang.IllegalStateException- if the type of the value does not match the type of this propertyjava.io.IOException
 
- 
addValue
public ItemInfoBuilder.PropertyInfoBuilder addValue(java.io.File value) throws javax.jcr.RepositoryException, java.io.IOException
Add aPropertyType.BINARYvalue to this property.- Parameters:
 value-- Returns:
 this- Throws:
 javax.jcr.RepositoryExceptionjava.lang.IllegalStateException- if the type of the value does not match the type of this propertyjava.io.IOException
 
- 
setMultivalued
public ItemInfoBuilder.PropertyInfoBuilder setMultivalued(boolean on)
Set this property to multi-values.- Parameters:
 on-- Returns:
 this- Throws:
 java.lang.IllegalStateException- if this property does not contain exactly on value
 
- 
build
public ItemInfoBuilder.NodeInfoBuilder build() throws javax.jcr.RepositoryException
Build thePropertyInfo. If aItemInfoBuilder.Listeneris associated with this instance, then itsItemInfoBuilder.Listener.createPropertyInfo(PropertyInfo)methods is called.- Returns:
 - the parent builder of this builder
 - Throws:
 javax.jcr.RepositoryExceptionjava.lang.IllegalStateException- if build has been called beforejava.lang.IllegalStateException- if the type is not set
 
- 
getParent
public ItemInfoBuilder.NodeInfoBuilder getParent()
- Returns:
 - the parent builder of this builder
 
 
- 
getPropertyInfo
public PropertyInfo getPropertyInfo()
Returns thePropertyInfowhich has been built by this builder.- Returns:
 - Throws:
 java.lang.IllegalStateException- ifbuild()has not been called before.
 
 - 
 
 -