org.apache.webdav.lib.methods

Class OptionsMethod


public class OptionsMethod
extends XMLResponseMethodBase

OPTIONS Method.

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase

XMLResponseMethodBase.OptionsResponse, XMLResponseMethodBase.Response, XMLResponseMethodBase.ResponseWithinMultistatus, XMLResponseMethodBase.SingleResponse

Field Summary

static String
ACL
ACL.
static String
ADVANCED_COLLECTIONS
Advanced collections.
static String
DASL
DASL.
static String
DAV_LEVEL1
DAV level 1.
static String
DAV_LEVEL2
DAV level 2.
static String
DELTAV
Delta V.
static int
OPTIONS_VERSION_HISTORY
static int
OPTIONS_WORKSPACE

Fields inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase

builder, decodeResponseHrefs, responseURLs

Constructor Summary

OptionsMethod()
Method constructor.
OptionsMethod(String path)
Method constructor.
OptionsMethod(String path, int type)
Method constructor.

Method Summary

void
addRequestHeaders(HttpState state, HttpConnection conn)
protected String
generateRequestBody()
DAV requests that contain a body must override this function to generate that body.
Enumeration
getAllResponseURLs()
This method returns an enumeration of URL paths.
Enumeration
getAllowedMethods()
Get a list of allowed methods.
Enumeration
getDavCapabilities()
Get a list of supported DAV capabilities.
String
getName()
Enumeration
getResponseProperties()
boolean
isAllowed(String method)
Is the specified method allowed ?
boolean
isSupported(String capability)
Is DAV capability supported ?
void
parseResponse(InputStream input, HttpState state, HttpConnection conn)
Parse response.
protected Document
parseResponseContent(InputStream is)
void
processResponseHeaders(HttpState state, HttpConnection conn)
Process response headers.

Methods inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase

convertElementToProperty, generateRequestBody, getDebug, getRequestContentLength, getResponseDocument, getResponseHashtable, getResponseURLs, getResponses, parseResponse, parseXMLResponse, readResponseBody, recycle, setDebug, setDecodeResponseHrefs, setDocument, setResponseHashtable, writeRequestBody

Methods inherited from class org.apache.webdav.lib.methods.HttpRequestBodyMethodBase

getRequestContentLength, isRequestContentAlreadySet, readContinueCode, recycle, setRequestBody, setRequestBody, setRequestBody, setRequestBody, setRequestBody, writeRequestBody

Field Details

ACL

public static final String ACL
ACL.

ADVANCED_COLLECTIONS

public static final String ADVANCED_COLLECTIONS
Advanced collections.

DASL

public static final String DASL
DASL.

DAV_LEVEL1

public static final String DAV_LEVEL1
DAV level 1. Mandatory.

DAV_LEVEL2

public static final String DAV_LEVEL2
DAV level 2.

DELTAV

public static final String DELTAV
Delta V.

OPTIONS_VERSION_HISTORY

public static final int OPTIONS_VERSION_HISTORY
Field Value:
9

OPTIONS_WORKSPACE

public static final int OPTIONS_WORKSPACE
Field Value:
8

Constructor Details

OptionsMethod

public OptionsMethod()
Method constructor.

OptionsMethod

public OptionsMethod(String path)
Method constructor.

OptionsMethod

public OptionsMethod(String path,
                     int type)
Method constructor.

Method Details

addRequestHeaders

public void addRequestHeaders(HttpState state,
                              HttpConnection conn)
            throws IOException,
                   HttpException

generateRequestBody

protected 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 interface XMLResponseMethodBase

getAllResponseURLs

public 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

getAllowedMethods

public Enumeration getAllowedMethods()
Get a list of allowed methods.

getDavCapabilities

public Enumeration getDavCapabilities()
Get a list of supported DAV capabilities.

getName

public String getName()

getResponseProperties

public Enumeration getResponseProperties()

isAllowed

public boolean isAllowed(String method)
Is the specified method allowed ?

isSupported

public boolean isSupported(String capability)
Is DAV capability supported ?

parseResponse

public void parseResponse(InputStream input,
                          HttpState state,
                          HttpConnection conn)
            throws IOException,
                   HttpException
Parse response.
Overrides:
parseResponse in interface XMLResponseMethodBase
Parameters:
input - Input stream

parseResponseContent

protected Document parseResponseContent(InputStream is)
            throws ParserConfigurationException,
                   SAXException,
                   IOException

processResponseHeaders

public void processResponseHeaders(HttpState state,
                                   HttpConnection conn)
Process response headers. The contract of this method is that it only parses the response headers.
Parameters:
state - the state
conn - the connection