Class OptionsResponse

java.lang.Object
org.apache.jackrabbit.webdav.version.OptionsResponse
All Implemented Interfaces:
DeltaVConstants, XmlSerializable

public class OptionsResponse extends 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, that OptionsResponse 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.
See Also:
  • Constructor Details

    • OptionsResponse

      public OptionsResponse()
  • Method Details

    • addEntry

      public void addEntry(String localName, Namespace namespace, String[] hrefs)
      Add a new entry to this OptionsResponse and make each href present in the String array being a separate DAV:href element within the entry.
      Parameters:
      localName -
      namespace -
      hrefs -
    • getHrefs

      public String[] getHrefs(String localName, Namespace namespace)
      Parameters:
      localName -
      namespace -
      Returns:
    • toXml

      public Element toXml(Document document)
      Return the Xml representation.
      Specified by:
      toXml in interface XmlSerializable
      Parameters:
      document -
      Returns:
      Xml representation.
      See Also:
    • createFromXml

      public static OptionsResponse createFromXml(Element orElem)
      Build a new OptionsResponse object from the given xml element.
      Parameters:
      orElem -
      Returns:
      a new OptionsResponse object
      Throws:
      IllegalArgumentException - if the specified element is null or if its name is other than 'DAV:options-response'.