Class ItemInfoBuilder.PropertyInfoBuilder
java.lang.Object
org.apache.jackrabbit.spi.commons.ItemInfoBuilder.PropertyInfoBuilder
- Enclosing class:
ItemInfoBuilder
Builder for
PropertyInfos. Use ItemInfoBuilder.NodeInfoBuilder.createPropertyInfo(String)
to create an instance of this class.-
Method Summary
Modifier and TypeMethodDescriptionaddValue(boolean value) Add aPropertyType.BOOLEANvalue to this property.addValue(byte[] value) Add aPropertyType.BINARYvalue to this property.addValue(double value) Add aPropertyType.DOUBLEvalue to this property.addValue(long value) Add aPropertyType.LONGvalue to this property.Add aPropertyType.BINARYvalue to this property.addValue(InputStream value) Add aPropertyType.BINARYvalue to this property.Add aPropertyType.STRINGvalue to this property.addValue(BigDecimal value) Add aPropertyType.DECIMALvalue to this property.Add aPropertyType.URIvalue to this property.Add aPropertyType.DATEvalue to this property.Add aPropertyType.NAMEvalue to this property.Add aPropertyType.PATHvalue to this property.Add avalueto this property.build()Build thePropertyInfo.Returns thePropertyInfowhich has been built by this builder.setMultivalued(boolean on) Set this property to multi-values.Set thelocalNameof this propertySet thenameof this propertysetNamespace(String namespace) Set the namespacesetType(int type) Set theof this propertytype
-
Method Details
-
setName
Set thenameof this property- Parameters:
name-- Returns:
-
setName
Set thelocalNameof this property- Parameters:
localName-- Returns:
-
setNamespace
Set the namespace- Parameters:
namespace-- Returns:
-
setType
Set theof this propertytype- Parameters:
type-- Returns:
this- Throws:
IllegalStateException- if a property of a different type has been added before.
-
addValue
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:
IllegalStateException- if the type of the value does not match the type of this property
-
addValue
Add aPropertyType.STRINGvalue to this property.- Parameters:
value-- Returns:
this- Throws:
RepositoryExceptionIllegalStateException- if the type of the value does not match the type of this property
-
addValue
Add aPropertyType.DATEvalue to this property.- Parameters:
value-- Returns:
this- Throws:
RepositoryExceptionIllegalStateException- if the type of the value does not match the type of this property
-
addValue
Add aPropertyType.DOUBLEvalue to this property.- Parameters:
value-- Returns:
this- Throws:
RepositoryExceptionIllegalStateException- if the type of the value does not match the type of this property
-
addValue
Add aPropertyType.LONGvalue to this property.- Parameters:
value-- Returns:
this- Throws:
RepositoryExceptionIllegalStateException- if the type of the value does not match the type of this property
-
addValue
Add aPropertyType.BOOLEANvalue to this property.- Parameters:
value-- Returns:
this- Throws:
RepositoryExceptionIllegalStateException- if the type of the value does not match the type of this property
-
addValue
Add aPropertyType.NAMEvalue to this property.- Parameters:
value-- Returns:
this- Throws:
RepositoryExceptionIllegalStateException- if the type of the value does not match the type of this property
-
addValue
Add aPropertyType.PATHvalue to this property.- Parameters:
value-- Returns:
this- Throws:
RepositoryExceptionIllegalStateException- if the type of the value does not match the type of this property
-
addValue
Add aPropertyType.DECIMALvalue to this property.- Parameters:
value-- Returns:
this- Throws:
RepositoryExceptionIllegalStateException- if the type of the value does not match the type of this property
-
addValue
Add aPropertyType.URIvalue to this property.- Parameters:
value-- Returns:
this- Throws:
RepositoryExceptionIllegalStateException- if the type of the value does not match the type of this property
-
addValue
Add aPropertyType.BINARYvalue to this property.- Parameters:
value-- Returns:
this- Throws:
RepositoryExceptionIllegalStateException- if the type of the value does not match the type of this property
-
addValue
public ItemInfoBuilder.PropertyInfoBuilder addValue(InputStream value) throws RepositoryException, IOException Add aPropertyType.BINARYvalue to this property.- Parameters:
value-- Returns:
this- Throws:
RepositoryExceptionIllegalStateException- if the type of the value does not match the type of this propertyIOException
-
addValue
public ItemInfoBuilder.PropertyInfoBuilder addValue(File value) throws RepositoryException, IOException Add aPropertyType.BINARYvalue to this property.- Parameters:
value-- Returns:
this- Throws:
RepositoryExceptionIllegalStateException- if the type of the value does not match the type of this propertyIOException
-
setMultivalued
Set this property to multi-values.- Parameters:
on-- Returns:
this- Throws:
IllegalStateException- if this property does not contain exactly on value
-
build
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:
RepositoryExceptionIllegalStateException- if build has been called beforeIllegalStateException- if the type is not set
-
getParent
- Returns:
- the parent builder of this builder
-
getPropertyInfo
Returns thePropertyInfowhich has been built by this builder.- Returns:
- Throws:
IllegalStateException- ifbuild()has not been called before.
-