public class ReportMethod extends XMLResponseMethodBase implements DepthSupport
The REPORT 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:
XMLResponseMethodBase.OptionsResponse, XMLResponseMethodBase.Response, XMLResponseMethodBase.ResponseWithinMultistatus, XMLResponseMethodBase.SingleResponse
Modifier and Type | Field and Description |
---|---|
static int |
ALL
Request of all properties name and value.
|
protected int |
depth
Depth.
|
static int |
LOCATE_HISTORY |
protected java.lang.String |
prefix
The namespace abbreviation that prefixes DAV tags
|
protected PropertyName[] |
propertyNames
Property name list.
|
static int |
SUB_SET
Request specified properties.
|
java.lang.String |
sVersionHistory |
protected int |
type
Type of the Propfind.
|
builder, decodeResponseHrefs, responseURLs
effectiveVersion, statusLine
DEPTH_0, DEPTH_1, DEPTH_INFINITY
Constructor and Description |
---|
ReportMethod()
Method constructor.
|
ReportMethod(java.lang.String path)
Method constructor.
|
ReportMethod(java.lang.String path,
java.util.Enumeration propertyNames)
Method constructor.
|
ReportMethod(java.lang.String path,
int depth)
Method constructor.
|
ReportMethod(java.lang.String path,
int depth,
java.util.Enumeration propertyNames)
Method constructor.
|
ReportMethod(java.lang.String path,
int depth,
java.util.Enumeration propertyNames,
java.util.Enumeration histUrl)
Method constructor.
|
ReportMethod(java.lang.String path,
int depth,
java.lang.String sBody) |
Modifier and Type | Method and Description |
---|---|
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 |
setHistoryURLs(java.util.Enumeration historyURLs)
sets History URL for locate by history Report
|
void |
setPropertyNames(java.util.Enumeration propertyNames)
Property names setter.
|
void |
setRequestHeader(java.lang.String headerName,
java.lang.String headerValue)
Set a header value, redirecting attempts to set the "Depth" header to
a
setDepth(int) call. |
void |
setType(int type)
Type setter.
|
convertElementToProperty, getDebug, getRequestContentLength, getResponseDocument, getResponseHashtable, getResponses, getResponseURLs, parseResponse, parseXMLResponse, readResponseBody, setDebug, setDecodeResponseHrefs, setDocument, setResponseHashtable, writeRequestBody
isRequestContentAlreadySet, readContinueCode, setRequestBody, setRequestBody, setRequestBody, setRequestBody, setRequestBody
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, processResponseHeaders, processStatusLine, readResponse, readResponseHeaders, readStatusLine, releaseConnection, removeRequestHeader, removeRequestHeader, responseBodyConsumed, setConnectionCloseForced, setDoAuthentication, setFollowRedirects, setHostConfiguration, setHttp11, setMethodRetryHandler, setParams, setPath, setQueryString, setQueryString, setRequestHeader, setResponseStream, setStrictMode, setURI, shouldCloseConnection, validate, writeRequest, writeRequestHeaders, writeRequestLine
public static final int SUB_SET
public static final int ALL
public static final int LOCATE_HISTORY
public java.lang.String sVersionHistory
protected int type
protected PropertyName[] propertyNames
protected int depth
protected java.lang.String prefix
public ReportMethod()
public ReportMethod(java.lang.String path)
public ReportMethod(java.lang.String path, int depth)
public ReportMethod(java.lang.String path, java.util.Enumeration propertyNames)
public ReportMethod(java.lang.String path, int depth, java.util.Enumeration propertyNames, java.util.Enumeration histUrl)
public ReportMethod(java.lang.String path, int depth, java.util.Enumeration propertyNames)
public ReportMethod(java.lang.String path, int depth, java.lang.String sBody)
public void setRequestHeader(java.lang.String headerName, java.lang.String headerValue)
setDepth(int)
call.setRequestHeader
in interface org.apache.commons.httpclient.HttpMethod
setRequestHeader
in class org.apache.commons.httpclient.HttpMethodBase
headerName
- Header nameheaderValue
- Header valuepublic void setType(int type)
type
- New type valuepublic int getType()
public void setDepth(int depth)
setDepth
in interface DepthSupport
depth
- New depth valuepublic int getDepth()
getDepth
in interface DepthSupport
public void setPropertyNames(java.util.Enumeration propertyNames)
propertyNames
- List of the property namespublic void setHistoryURLs(java.util.Enumeration historyURLs)
public java.lang.String getName()
getName
in interface org.apache.commons.httpclient.HttpMethod
getName
in class org.apache.commons.httpclient.HttpMethodBase
public void recycle()
XMLResponseMethodBase
recycle
in interface org.apache.commons.httpclient.HttpMethod
recycle
in class XMLResponseMethodBase
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.HttpMethodBase
state
- State tokenconn
- The connection being used to make the request.java.io.IOException
org.apache.commons.httpclient.HttpException
protected java.lang.String generateRequestBody()
The default behavior simply returns an empty body.
generateRequestBody
in class XMLResponseMethodBase
public java.util.Enumeration getAllResponseURLs()
<D:href>
elements
of the response.public java.util.Enumeration getResponseProperties(java.lang.String urlPath)
Property
objects.