Class OptionsMethod

  • All Implemented Interfaces:
    org.apache.commons.httpclient.HttpMethod

    public class OptionsMethod
    extends XMLResponseMethodBase
    OPTIONS Method.
    • Constructor Detail

      • OptionsMethod

        public OptionsMethod()
        Method constructor.
      • OptionsMethod

        public OptionsMethod​(java.lang.String path)
        Method constructor.
      • OptionsMethod

        public OptionsMethod​(java.lang.String path,
                             int type)
        Method constructor.
    • Method Detail

      • isAllowed

        public boolean isAllowed​(java.lang.String method)
        Is the specified method allowed ?
      • getAllowedMethods

        public java.util.Enumeration getAllowedMethods()
        Get a list of allowed methods.
      • isSupported

        public boolean isSupported​(java.lang.String capability)
        Is DAV capability supported ?
      • getDavCapabilities

        public java.util.Enumeration getDavCapabilities()
        Get a list of supported DAV capabilities.
      • parseResponse

        public void parseResponse​(java.io.InputStream input,
                                  org.apache.commons.httpclient.HttpState state,
                                  org.apache.commons.httpclient.HttpConnection conn)
                           throws java.io.IOException,
                                  org.apache.commons.httpclient.HttpException
        Parse response.
        Overrides:
        parseResponse in class XMLResponseMethodBase
        Parameters:
        input - Input stream
        Throws:
        java.io.IOException
        org.apache.commons.httpclient.HttpException
      • processResponseHeaders

        public void processResponseHeaders​(org.apache.commons.httpclient.HttpState state,
                                           org.apache.commons.httpclient.HttpConnection conn)
        Process response headers. The contract of this method is that it only parses the response headers.
        Overrides:
        processResponseHeaders in class org.apache.commons.httpclient.HttpMethodBase
        Parameters:
        state - the state
        conn - the connection
      • generateRequestBody

        protected java.lang.String generateRequestBody()
        DAV requests that contain a body must override this function to generate that body.

        The default behavior simply returns an empty body.

        Overrides:
        generateRequestBody in class XMLResponseMethodBase
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface org.apache.commons.httpclient.HttpMethod
        Specified by:
        getName in class org.apache.commons.httpclient.HttpMethodBase
      • addRequestHeaders

        public void addRequestHeaders​(org.apache.commons.httpclient.HttpState state,
                                      org.apache.commons.httpclient.HttpConnection conn)
                               throws java.io.IOException,
                                      org.apache.commons.httpclient.HttpException
        Overrides:
        addRequestHeaders in class org.apache.commons.httpclient.HttpMethodBase
        Throws:
        java.io.IOException
        org.apache.commons.httpclient.HttpException
      • getAllResponseURLs

        public java.util.Enumeration getAllResponseURLs()
        This method returns an enumeration of URL paths. If the PropFindMethod was sent to the URL of a collection, then there will be multiple URLs. The URLs are picked out of the <D:href> elements of the response.
        Returns:
        an enumeration of URL paths as Strings
      • getResponseProperties

        public java.util.Enumeration getResponseProperties()
      • parseResponseContent

        protected org.w3c.dom.Document parseResponseContent​(java.io.InputStream is)
                                                     throws javax.xml.parsers.ParserConfigurationException,
                                                            org.xml.sax.SAXException,
                                                            java.io.IOException
        Throws:
        javax.xml.parsers.ParserConfigurationException
        org.xml.sax.SAXException
        java.io.IOException