|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.httpclient.HttpMethodBase
org.apache.webdav.lib.methods.HttpRequestBodyMethodBase
org.apache.webdav.lib.methods.XMLResponseMethodBase
org.apache.webdav.lib.methods.PropFindMethod
public class PropFindMethod
This class implements the WebDAV PROPFIND Method.
The PROPFIND method retrieves properties defined on the resource identified by the Request-URI, if the resource does not have any internal members, or on the resource identified by the Request-URI and potentially its member resources, if the resource is a collection that has internal member URIs.
A typical request looks like this:
PROPFIND /file HTTP/1.1
Host: www.foo.bar
Content-type: text/xml; charset="utf-8"
Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?>
<D:propfind xmlns:D="DAV:">
<D:prop xmlns:R="http://www.foo.bar/boxschema/">
<R:bigbox/>
<R:author/>
<R:DingALing/>
<R:Random/>
</D:prop>
</D:propfind>
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase |
|---|
XMLResponseMethodBase.Response |
| Field Summary | |
|---|---|
static int |
ALL
Request of all properties name and value. |
static int |
BY_NAME
Request of named properties. |
protected int |
depth
Depth. |
static int |
NAMES
Request of all properties name. |
protected java.lang.String |
prefix
The namespace abbreviation that prefixes DAV tags |
protected PropertyName[] |
propertyNames
Property name list. |
protected int |
type
Type of the Propfind. |
| Fields inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase |
|---|
builder, decodeResponseHrefs, responseURLs |
| Fields inherited from class org.apache.commons.httpclient.HttpMethodBase |
|---|
USER_AGENT |
| Fields inherited from interface org.apache.webdav.lib.methods.DepthSupport |
|---|
DEPTH_0, DEPTH_1, DEPTH_INFINITY |
| Constructor Summary | |
|---|---|
PropFindMethod()
Method constructor. |
|
PropFindMethod(java.lang.String path)
Method constructor. |
|
PropFindMethod(java.lang.String path,
java.util.Enumeration propertyNames)
Method constructor. |
|
PropFindMethod(java.lang.String path,
int depth)
Method constructor. |
|
PropFindMethod(java.lang.String path,
int depth,
java.util.Enumeration propertyNames)
Method constructor. |
|
PropFindMethod(java.lang.String path,
int depth,
int type)
Method constructor. |
|
| Method Summary | |
|---|---|
void |
addRequestHeaders(org.apache.commons.httpclient.HttpState state,
org.apache.commons.httpclient.HttpConnection conn)
Generate additional headers needed by the request. |
protected java.lang.String |
generateRequestBody()
DAV requests that contain a body must override this function to generate that body. |
java.util.Enumeration |
getAllResponseURLs()
This method returns an enumeration of URL paths. |
int |
getDepth()
Depth getter. |
java.lang.String |
getName()
|
java.util.Enumeration |
getResponseProperties(java.lang.String urlPath)
Returns an enumeration of Property objects. |
int |
getType()
Type getter. |
void |
recycle()
Reset the State of the class to its initial state, so that it can be used again. |
void |
setDepth(int depth)
Depth setter. |
void |
setPropertyNames(java.util.Enumeration propertyNames)
Property names setter. |
void |
setRequestHeader(java.lang.String headerName,
java.lang.String headerValue)
Set a request header value, redirecting the special case of the "Depth" header to invoke setDepth(int) instead. |
void |
setType(int type)
Type setter. |
| Methods inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase |
|---|
convertElementToProperty, getDebug, getRequestContentLength, getResponseDocument, getResponseHashtable, getResponses, getResponseURLs, parseResponse, parseXMLResponse, readResponseBody, 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 |
|---|
addAuthorizationRequestHeader, addContentLengthRequestHeader, addCookieRequestHeader, addHostRequestHeader, addProxyAuthorizationRequestHeader, addProxyConnectionHeader, addRequestHeader, addRequestHeader, addResponseFooter, addUserAgentRequestHeader, checkNotUsed, checkUsed, execute, fakeResponse, generateRequestLine, getAuthenticationRealm, getContentCharSet, getDoAuthentication, getFollowRedirects, getHostConfiguration, getMethodRetryHandler, getPath, getProxyAuthenticationRealm, getQueryString, getRecoverableExceptionCount, getRequestCharSet, getRequestHeader, getRequestHeaderGroup, getRequestHeaders, getResponseBody, getResponseBodyAsStream, getResponseBodyAsString, getResponseCharSet, getResponseContentLength, getResponseFooter, getResponseFooters, getResponseHeader, getResponseHeaderGroup, getResponseHeaders, getResponseStream, getResponseTrailerHeaderGroup, getStatusCode, getStatusLine, getStatusText, getURI, hasBeenUsed, isConnectionCloseForced, isHttp11, isStrictMode, processResponseBody, processResponseHeaders, processStatusLine, readResponse, readResponseHeaders, readStatusLine, releaseConnection, removeRequestHeader, responseBodyConsumed, setConnectionCloseForced, setDoAuthentication, setFollowRedirects, setHostConfiguration, setHttp11, setMethodRetryHandler, setPath, setQueryString, setQueryString, setRequestHeader, setResponseStream, setStrictMode, shouldCloseConnection, validate, writeRequest, writeRequestHeaders, writeRequestLine |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int BY_NAME
public static final int ALL
public static final int NAMES
protected int type
protected PropertyName[] propertyNames
protected int depth
protected java.lang.String prefix
| Constructor Detail |
|---|
public PropFindMethod()
public PropFindMethod(java.lang.String path)
public PropFindMethod(java.lang.String path,
int depth)
public PropFindMethod(java.lang.String path,
int depth,
int type)
public PropFindMethod(java.lang.String path,
java.util.Enumeration propertyNames)
public PropFindMethod(java.lang.String path,
int depth,
java.util.Enumeration propertyNames)
| Method Detail |
|---|
public void setRequestHeader(java.lang.String headerName,
java.lang.String headerValue)
setDepth(int) instead.
setRequestHeader in interface org.apache.commons.httpclient.HttpMethodsetRequestHeader in class org.apache.commons.httpclient.HttpMethodBaseheaderName - Header nameheaderValue - Header valuepublic void setType(int type)
type - New type valuepublic int getType()
public void setDepth(int depth)
setDepth in interface DepthSupportdepth - New depth valuepublic int getDepth()
getDepth in interface DepthSupportpublic void setPropertyNames(java.util.Enumeration propertyNames)
propertyNames - List of the property namespublic void recycle()
XMLResponseMethodBase
recycle in interface org.apache.commons.httpclient.HttpMethodrecycle in class XMLResponseMethodBasepublic java.lang.String getName()
getName in interface org.apache.commons.httpclient.HttpMethodgetName in class org.apache.commons.httpclient.HttpMethodBase
public void addRequestHeaders(org.apache.commons.httpclient.HttpState state,
org.apache.commons.httpclient.HttpConnection conn)
throws java.io.IOException,
org.apache.commons.httpclient.HttpException
addRequestHeaders in class org.apache.commons.httpclient.HttpMethodBasestate - State tokenconn - The connection being used to make the request.
java.io.IOException
org.apache.commons.httpclient.HttpExceptionprotected java.lang.String generateRequestBody()
The default behavior simply returns an empty body.
generateRequestBody in class XMLResponseMethodBasepublic java.util.Enumeration getAllResponseURLs()
<D:href> elements
of the response.
public java.util.Enumeration getResponseProperties(java.lang.String urlPath)
Property objects.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||