Package org.apache.webdav.lib.methods
Class OptionsMethod
java.lang.Object
org.apache.commons.httpclient.HttpMethodBase
org.apache.webdav.lib.methods.HttpRequestBodyMethodBase
org.apache.webdav.lib.methods.XMLResponseMethodBase
org.apache.webdav.lib.methods.OptionsMethod
- All Implemented Interfaces:
org.apache.commons.httpclient.HttpMethod
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
FieldsModifier and TypeFieldDescriptionstatic final String
ACL.static final String
Advanced collections.static final String
DASL.static final String
DAV level 1.static final String
DAV level 2.static final String
Delta V.static final int
static final int
Fields inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase
builder, decodeResponseHrefs, responseURLs
Fields inherited from class org.apache.commons.httpclient.HttpMethodBase
effectiveVersion, statusLine
-
Constructor Summary
ConstructorsConstructorDescriptionMethod constructor.OptionsMethod
(String path) Method constructor.OptionsMethod
(String path, int type) Method constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRequestHeaders
(org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.HttpConnection conn) protected String
DAV requests that contain a body must override this function to generate that body.Get a list of allowed methods.This method returns an enumeration of URL paths.Get a list of supported DAV capabilities.getName()
boolean
Is the specified method allowed ?boolean
isSupported
(String capability) Is DAV capability supported ?void
parseResponse
(InputStream input, org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.HttpConnection conn) Parse response.protected Document
void
processResponseHeaders
(org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.HttpConnection conn) Process response headers.Methods inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase
convertElementToProperty, getDebug, getRequestContentLength, getResponseDocument, getResponseHashtable, getResponses, getResponseURLs, parseXMLResponse, readResponseBody, recycle, setDebug, setDecodeResponseHrefs, setDocument, setResponseHashtable, writeRequestBody
Methods inherited from class org.apache.webdav.lib.methods.HttpRequestBodyMethodBase
isRequestContentAlreadySet, readContinueCode, setRequestBody, setRequestBody, setRequestBody, setRequestBody, setRequestBody
Methods inherited from class org.apache.commons.httpclient.HttpMethodBase
abort, addCookieRequestHeader, addHostRequestHeader, addProxyConnectionHeader, addRequestHeader, addRequestHeader, addResponseFooter, addUserAgentRequestHeader, checkNotUsed, checkUsed, execute, generateRequestLine, getAuthenticationRealm, getContentCharSet, getDoAuthentication, getEffectiveVersion, getFollowRedirects, getHostAuthState, getHostConfiguration, getMethodRetryHandler, getParams, getPath, getProxyAuthenticationRealm, getProxyAuthState, getQueryString, getRecoverableExceptionCount, getRequestCharSet, getRequestHeader, getRequestHeaderGroup, getRequestHeaders, getRequestHeaders, getResponseBody, getResponseBody, getResponseBodyAsStream, getResponseBodyAsString, getResponseBodyAsString, getResponseCharSet, getResponseContentLength, getResponseFooter, getResponseFooters, getResponseHeader, getResponseHeaderGroup, getResponseHeaders, getResponseHeaders, getResponseStream, getResponseTrailerHeaderGroup, getStatusCode, getStatusLine, getStatusText, getURI, hasBeenUsed, isAborted, isConnectionCloseForced, isHttp11, isRequestSent, isStrictMode, processCookieHeaders, processResponseBody, processStatusLine, readResponse, readResponseHeaders, readStatusLine, releaseConnection, removeRequestHeader, removeRequestHeader, responseBodyConsumed, setConnectionCloseForced, setDoAuthentication, setFollowRedirects, setHostConfiguration, setHttp11, setMethodRetryHandler, setParams, setPath, setQueryString, setQueryString, setRequestHeader, setRequestHeader, setResponseStream, setStrictMode, setURI, shouldCloseConnection, validate, writeRequest, writeRequestHeaders, writeRequestLine
-
Field Details
-
DAV_LEVEL1
DAV level 1. Mandatory.- See Also:
-
DAV_LEVEL2
DAV level 2.- See Also:
-
ADVANCED_COLLECTIONS
Advanced collections.- See Also:
-
DELTAV
Delta V.- See Also:
-
ACL
ACL.- See Also:
-
DASL
DASL.- See Also:
-
OPTIONS_WORKSPACE
public static final int OPTIONS_WORKSPACE- See Also:
-
OPTIONS_VERSION_HISTORY
public static final int OPTIONS_VERSION_HISTORY- See Also:
-
-
Constructor Details
-
OptionsMethod
public OptionsMethod()Method constructor. -
OptionsMethod
Method constructor. -
OptionsMethod
Method constructor.
-
-
Method Details
-
isAllowed
Is the specified method allowed ? -
getAllowedMethods
Get a list of allowed methods. -
isSupported
Is DAV capability supported ? -
getDavCapabilities
Get a list of supported DAV capabilities. -
parseResponse
public void parseResponse(InputStream input, org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.HttpConnection conn) throws IOException, org.apache.commons.httpclient.HttpException Parse response.- Overrides:
parseResponse
in classXMLResponseMethodBase
- Parameters:
input
- Input stream- Throws:
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 classorg.apache.commons.httpclient.HttpMethodBase
- Parameters:
state
- the stateconn
- the connection
-
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 classXMLResponseMethodBase
-
getName
- Specified by:
getName
in interfaceorg.apache.commons.httpclient.HttpMethod
- Specified by:
getName
in classorg.apache.commons.httpclient.HttpMethodBase
-
addRequestHeaders
public void addRequestHeaders(org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.HttpConnection conn) throws IOException, org.apache.commons.httpclient.HttpException - Overrides:
addRequestHeaders
in classorg.apache.commons.httpclient.HttpMethodBase
- Throws:
IOException
org.apache.commons.httpclient.HttpException
-
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
-
parseResponseContent
protected Document parseResponseContent(InputStream is) throws ParserConfigurationException, SAXException, IOException
-