|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.webdav.property.AbstractDavProperty<Value[]>
org.apache.jackrabbit.webdav.jcr.property.ValuesProperty
public class ValuesProperty
ValuesProperty extends DavProperty providing
utilities to handle the multiple values of the property item represented
by this resource.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
ValuesProperty(DavProperty<?> property,
int defaultType,
ValueFactory valueFactory)
Wrap the specified DavProperty in a new ValuesProperty. |
|
ValuesProperty(Value value)
Create a new ValuesProperty from the given single Value. |
|
ValuesProperty(Value[] values)
Create a new ValuesProperty from the given Value
array. |
|
| Method Summary | |
|---|---|
Value |
getJcrValue()
|
Value |
getJcrValue(int propertyType,
ValueFactory valueFactory)
|
Value[] |
getJcrValues()
Returns the internal property value as jcr Value array |
Value[] |
getJcrValues(int propertyType,
ValueFactory valueFactory)
Converts the value of this property to a value array. |
Value[] |
getValue()
Returns an array of Values representing the value of this
property. |
int |
getValueType()
Returns the type of the values present in this property
or PropertyType.UNDEFINED if no values are available. |
Element |
toXml(Document document)
Return a XML element representation of this property. |
| Methods inherited from class org.apache.jackrabbit.webdav.property.AbstractDavProperty |
|---|
equals, getName, hashCode, isInvisibleInAllprop |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ValuesProperty(Value value)
ValuesProperty from the given single Value.
value - Array of Value objects as obtained from the JCR property.public ValuesProperty(Value[] values)
ValuesProperty from the given Value
array.
values - Array of Value objects as obtained from the JCR property.
public ValuesProperty(DavProperty<?> property,
int defaultType,
ValueFactory valueFactory)
throws RepositoryException,
DavException
DavProperty in a new ValuesProperty.
property - defaultType - default type of the values to be deserialized. If however
the 'value' elements provide a 'type'
attribute, the default value is ignored.valueFactory - Factory used to retrieve JCR values from the value
of the given DavProperty.
RepositoryException
DavException| Method Detail |
|---|
public Value[] getJcrValues(int propertyType,
ValueFactory valueFactory)
throws ValueFormatException
value array.
ValueFormatException - if convertion of the internal jcr values to
the specified value type fails.
public Value[] getJcrValues()
throws ValueFormatException
Value array
Value array
ValueFormatException
public Value getJcrValue(int propertyType,
ValueFactory valueFactory)
throws ValueFormatException
propertyType -
ValueFormatException
public Value getJcrValue()
throws ValueFormatException
ValueFormatExceptionpublic int getValueType()
values present in this property
or PropertyType.UNDEFINED if no values are available.
PropertyType.UNDEFINEDpublic Value[] getValue()
Values representing the value of this
property.
getValue in interface DavProperty<Value[]>ValuesgetJcrValues(),
getJcrValue()public Element toXml(Document document)
AbstractDavProperty
new DavProperty("displayname", "WebDAV Directory").toXml
gives a element like:
<D:displayname>WebDAV Directory</D:displayname>
new DavProperty("resourcetype", new Element("collection")).toXml
gives a element like:
<D:resourcetype><D:collection/></D:resourcetype>
Element[] customVals = { new Element("bla", customNamespace), new Element("bli", customNamespace) };
new DavProperty("custom-property", customVals, customNamespace).toXml
gives an element like
<Z:custom-property>
<Z:bla/>
<Z:bli/>
</Z:custom-property>
toXml in interface XmlSerializabletoXml in class AbstractDavProperty<Value[]>document -
XmlSerializable.toXml(Document)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||