public class HrefProperty extends AbstractDavProperty<String[]>
HrefProperty
is an extension to the common DavProperty
.
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.DavConstants.XML_HREF
,
DavProperty.getValue()
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 and Description |
---|
HrefProperty(DavProperty<?> prop)
Create a new
HrefProperty from the specified property. |
HrefProperty(DavPropertyName name,
String[] value,
boolean isInvisibleInAllprop)
Creates a new WebDAV property with the given
DavPropertyName |
HrefProperty(DavPropertyName name,
String value,
boolean isInvisibleInAllprop)
Creates a new WebDAV property with the given
DavPropertyName |
Modifier and Type | Method and Description |
---|---|
List<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 on
XmlSerializable.toXml(Document) |
String[] |
getValue()
Returns an array of String.
|
Element |
toXml(Document document)
Returns an Xml element with the following form:
|
equals, getName, hashCode, isInvisibleInAllprop
public HrefProperty(DavPropertyName name, String value, boolean isInvisibleInAllprop)
DavPropertyName
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 a DAV:allprop
PROPFIND request.public HrefProperty(DavPropertyName name, String[] value, boolean isInvisibleInAllprop)
DavPropertyName
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 a DAV:allprop
PROPFIND request.public HrefProperty(DavProperty<?> prop)
HrefProperty
from the specified property.
Please note, that the property must have a List
value
object, consisting of href
Element
entries.prop
- public Element toXml(Document document)
<Z:name> <DAV:href>value</DAV:href/> </Z:name>where Z: represents the prefix of the namespace defined with the initial webdav property name.
toXml
in interface XmlSerializable
toXml
in class AbstractDavProperty<String[]>
document
- DomUtil.hrefToXml(String,org.w3c.dom.Document)
public String[] getValue()
DavProperty.getValue()
public List<String> getHrefs()
XmlSerializable.toXml(Document)
Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.