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
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
Fields Modifier and Type Field Description static java.lang.StringACLACL.static java.lang.StringADVANCED_COLLECTIONSAdvanced collections.static java.lang.StringDASLDASL.static java.lang.StringDAV_LEVEL1DAV level 1.static java.lang.StringDAV_LEVEL2DAV level 2.static java.lang.StringDELTAVDelta V.static intOPTIONS_VERSION_HISTORYstatic intOPTIONS_WORKSPACE-
Fields inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase
builder, decodeResponseHrefs, responseURLs
-
-
Constructor Summary
Constructors Constructor Description OptionsMethod()Method constructor.OptionsMethod(java.lang.String path)Method constructor.OptionsMethod(java.lang.String path, int type)Method constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRequestHeaders(org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.HttpConnection conn)protected java.lang.StringgenerateRequestBody()DAV requests that contain a body must override this function to generate that body.java.util.EnumerationgetAllowedMethods()Get a list of allowed methods.java.util.EnumerationgetAllResponseURLs()This method returns an enumeration of URL paths.java.util.EnumerationgetDavCapabilities()Get a list of supported DAV capabilities.java.lang.StringgetName()java.util.EnumerationgetResponseProperties()booleanisAllowed(java.lang.String method)Is the specified method allowed ?booleanisSupported(java.lang.String capability)Is DAV capability supported ?voidparseResponse(java.io.InputStream input, org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.HttpConnection conn)Parse response.protected org.w3c.dom.DocumentparseResponseContent(java.io.InputStream is)voidprocessResponseHeaders(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 Detail
-
DAV_LEVEL1
public static final java.lang.String DAV_LEVEL1
DAV level 1. Mandatory.- See Also:
- Constant Field Values
-
DAV_LEVEL2
public static final java.lang.String DAV_LEVEL2
DAV level 2.- See Also:
- Constant Field Values
-
ADVANCED_COLLECTIONS
public static final java.lang.String ADVANCED_COLLECTIONS
Advanced collections.- See Also:
- Constant Field Values
-
DELTAV
public static final java.lang.String DELTAV
Delta V.- See Also:
- Constant Field Values
-
ACL
public static final java.lang.String ACL
ACL.- See Also:
- Constant Field Values
-
DASL
public static final java.lang.String DASL
DASL.- See Also:
- Constant Field Values
-
OPTIONS_WORKSPACE
public static final int OPTIONS_WORKSPACE
- See Also:
- Constant Field Values
-
OPTIONS_VERSION_HISTORY
public static final int OPTIONS_VERSION_HISTORY
- See Also:
- Constant Field Values
-
-
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.HttpExceptionParse response.- Overrides:
parseResponsein classXMLResponseMethodBase- Parameters:
input- Input stream- Throws:
java.io.IOExceptionorg.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:
processResponseHeadersin classorg.apache.commons.httpclient.HttpMethodBase- Parameters:
state- the stateconn- 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:
generateRequestBodyin classXMLResponseMethodBase
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceorg.apache.commons.httpclient.HttpMethod- Specified by:
getNamein classorg.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:
addRequestHeadersin classorg.apache.commons.httpclient.HttpMethodBase- Throws:
java.io.IOExceptionorg.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.ParserConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOException
-
-