Class HrefProperty
- java.lang.Object
-
- org.apache.jackrabbit.webdav.property.AbstractDavProperty<java.lang.String[]>
-
- org.apache.jackrabbit.webdav.property.HrefProperty
-
- All Implemented Interfaces:
DavConstants
,DavProperty<java.lang.String[]>
,PropEntry
,XmlSerializable
- Direct Known Subclasses:
OrderingType
public class HrefProperty extends AbstractDavProperty<java.lang.String[]>
HrefProperty
is an extension to the commonDavProperty
. The String representation of the property value is always displayed as text inside an extra 'href' element. If the value is a String array each array element is added as text to a separate 'href' element.- See Also:
DavConstants.XML_HREF
,DavProperty.getValue()
-
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.webdav.DavConstants
creationDateFormat, DEPTH_0, DEPTH_1, DEPTH_INFINITY, DEPTH_INFINITY_S, HEADER_AUTHORIZATION, HEADER_CONTENT_LANGUAGE, HEADER_CONTENT_LENGTH, HEADER_CONTENT_TYPE, HEADER_DAV, HEADER_DEPTH, HEADER_DESTINATION, HEADER_ETAG, HEADER_IF, HEADER_LAST_MODIFIED, HEADER_LOCK_TOKEN, HEADER_OVERWRITE, HEADER_TIMEOUT, INFINITE_TIMEOUT, modificationDateFormat, NAMESPACE, OPAQUE_LOCK_TOKEN_PREFIX, PROPERTY_CREATIONDATE, PROPERTY_DISPLAYNAME, PROPERTY_GETCONTENTLANGUAGE, PROPERTY_GETCONTENTLENGTH, PROPERTY_GETCONTENTTYPE, PROPERTY_GETETAG, PROPERTY_GETLASTMODIFIED, PROPERTY_LOCKDISCOVERY, PROPERTY_RESOURCETYPE, PROPERTY_SOURCE, PROPERTY_SUPPORTEDLOCK, PROPFIND_ALL_PROP, PROPFIND_ALL_PROP_INCLUDE, PROPFIND_BY_PROPERTY, PROPFIND_PROPERTY_NAMES, TIMEOUT_INFINITE, UNDEFINED_TIME, UNDEFINED_TIMEOUT, XML_ACTIVELOCK, XML_ALLPROP, XML_COLLECTION, XML_DEPTH, XML_DST, XML_EXCLUSIVE, XML_HREF, XML_INCLUDE, XML_KEEPALIVE, XML_LINK, XML_LOCKENTRY, XML_LOCKINFO, XML_LOCKROOT, XML_LOCKSCOPE, XML_LOCKTOKEN, XML_LOCKTYPE, XML_MULTISTATUS, XML_OMIT, XML_OWNER, XML_PROP, XML_PROPERTYBEHAVIOR, XML_PROPERTYUPDATE, XML_PROPFIND, XML_PROPNAME, XML_PROPSTAT, XML_REMOVE, XML_RESPONSE, XML_RESPONSEDESCRIPTION, XML_SET, XML_SHARED, XML_SOURCE, XML_STATUS, XML_TIMEOUT, XML_WRITE
-
-
Constructor Summary
Constructors Constructor Description HrefProperty(DavProperty<?> prop)
Create a newHrefProperty
from the specified property.HrefProperty(DavPropertyName name, java.lang.String[] value, boolean isInvisibleInAllprop)
Creates a new WebDAV property with the givenDavPropertyName
HrefProperty(DavPropertyName name, java.lang.String value, boolean isInvisibleInAllprop)
Creates a new WebDAV property with the givenDavPropertyName
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
getHrefs()
Return an list of String containing the text of those DAV:href elements that would be returned as child elements of this property onXmlSerializable.toXml(Document)
java.lang.String[]
getValue()
Returns an array of String.org.w3c.dom.Element
toXml(org.w3c.dom.Document document)
Returns an Xml element with the following form:-
Methods inherited from class org.apache.jackrabbit.webdav.property.AbstractDavProperty
equals, getName, hashCode, isInvisibleInAllprop
-
-
-
-
Constructor Detail
-
HrefProperty
public HrefProperty(DavPropertyName name, java.lang.String value, boolean isInvisibleInAllprop)
Creates a new WebDAV property with the givenDavPropertyName
- Parameters:
name
- the name of the propertyvalue
- the value of the propertyisInvisibleInAllprop
- A value of true, defines this property to be invisible in PROPFIND/allprop It will not be returned in aDAV:allprop
PROPFIND request.
-
HrefProperty
public HrefProperty(DavPropertyName name, java.lang.String[] value, boolean isInvisibleInAllprop)
Creates a new WebDAV property with the givenDavPropertyName
- Parameters:
name
- the name of the propertyvalue
- the value of the propertyisInvisibleInAllprop
- A value of true, defines this property to be invisible in PROPFIND/allprop It will not be returned in aDAV:allprop
PROPFIND request.
-
HrefProperty
public HrefProperty(DavProperty<?> prop)
Create a newHrefProperty
from the specified property. Please note, that the property must have aList
value object, consisting ofhref
Element
entries.- Parameters:
prop
-
-
-
Method Detail
-
toXml
public org.w3c.dom.Element toXml(org.w3c.dom.Document document)
Returns an Xml element with the following form:<Z:name> <DAV:href>value</DAV:href/> </Z:name>
where Z: represents the prefix of the namespace defined with the initial webdav property name.- Specified by:
toXml
in interfaceXmlSerializable
- Overrides:
toXml
in classAbstractDavProperty<java.lang.String[]>
- Parameters:
document
-- Returns:
- Xml representation
- See Also:
DomUtil.hrefToXml(String,org.w3c.dom.Document)
-
getValue
public java.lang.String[] getValue()
Returns an array of String.- Returns:
- an array of String.
- See Also:
DavProperty.getValue()
-
getHrefs
public java.util.List<java.lang.String> getHrefs()
Return an list of String containing the text of those DAV:href elements that would be returned as child elements of this property onXmlSerializable.toXml(Document)
- Returns:
- list of href String
-
-