Class OptionsResponse
- java.lang.Object
-
- org.apache.jackrabbit.webdav.version.OptionsResponse
-
- All Implemented Interfaces:
DeltaVConstants
,XmlSerializable
public class OptionsResponse extends java.lang.Object implements DeltaVConstants, XmlSerializable
OptionsResponse
encapsulates the DAV:options-response element present in the response body of a successful OPTIONS request (with body).
The DAV:options-response element is defined to have the following format.<!ELEMENT options-response ANY> ANY value: A sequence of elements
Please note, thatOptionsResponse
represents a simplified implementation of the given structure. We assume, that there may only entries that consist of a qualified name and a set of href child elements.
-
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.webdav.version.DeltaVConstants
ATTR_NAME, ATTR_NAMESPACE, COMMENT, CREATOR_DISPLAYNAME, HEADER_LABEL, HEADER_LOCATION, NAMESPACE, SUPPORTED_LIVE_PROPERTY_SET, SUPPORTED_METHOD_SET, SUPPORTED_REPORT_SET, VERSION_CONTROLLED_CONFIGURATION, WORKSPACE, XML_ACTIVITY, XML_ACTIVITY_COLLECTION_SET, XML_BASELINE, XML_CHECKOUT, XML_CHECKOUT_CHECKIN, XML_CHECKOUT_UNLOCK_CHECKIN, XML_EXPAND_PROPERTY, XML_LABEL, XML_LABEL_ADD, XML_LABEL_NAME, XML_LABEL_REMOVE, XML_LABEL_SET, XML_LOCATE_BY_HISTORY, XML_LOCKED_CHECKIN, XML_MERGE, XML_N0_AUTO_MERGE, XML_N0_CHECKOUT, XML_OPTIONS, XML_OPTIONS_RESPONSE, XML_PROPERTY, XML_REPORT, XML_SUPPORTED_METHOD, XML_SUPPORTED_REPORT, XML_UPDATE, XML_VERSION, XML_VERSION_HISTORY, XML_VERSION_HISTORY_SET, XML_VERSION_TREE, XML_VH_COLLECTION_SET, XML_WORKSPACE, XML_WSP_COLLECTION_SET
-
-
Constructor Summary
Constructors Constructor Description OptionsResponse()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEntry(java.lang.String localName, Namespace namespace, java.lang.String[] hrefs)
Add a new entry to thisOptionsResponse
and make each href present in the String array being a separateDAV:href
element within the entry.static OptionsResponse
createFromXml(org.w3c.dom.Element orElem)
Build a newOptionsResponse
object from the given xml element.java.lang.String[]
getHrefs(java.lang.String localName, Namespace namespace)
org.w3c.dom.Element
toXml(org.w3c.dom.Document document)
Return the Xml representation.
-
-
-
Method Detail
-
addEntry
public void addEntry(java.lang.String localName, Namespace namespace, java.lang.String[] hrefs)
Add a new entry to thisOptionsResponse
and make each href present in the String array being a separateDAV:href
element within the entry.- Parameters:
localName
-namespace
-hrefs
-
-
getHrefs
public java.lang.String[] getHrefs(java.lang.String localName, Namespace namespace)
- Parameters:
localName
-namespace
-- Returns:
-
toXml
public org.w3c.dom.Element toXml(org.w3c.dom.Document document)
Return the Xml representation.- Specified by:
toXml
in interfaceXmlSerializable
- Parameters:
document
-- Returns:
- Xml representation.
- See Also:
XmlSerializable.toXml(Document)
-
createFromXml
public static OptionsResponse createFromXml(org.w3c.dom.Element orElem)
Build a newOptionsResponse
object from the given xml element.- Parameters:
orElem
-- Returns:
- a new
OptionsResponse
object - Throws:
java.lang.IllegalArgumentException
- if the specified element isnull
or if its name is other than 'DAV:options-response'.
-
-