Class BaseDavRequest
java.lang.Object
org.apache.http.message.AbstractHttpMessage
org.apache.http.client.methods.AbstractExecutionAwareRequest
org.apache.http.client.methods.HttpRequestBase
org.apache.http.client.methods.HttpEntityEnclosingRequestBase
org.apache.jackrabbit.webdav.client.methods.BaseDavRequest
- All Implemented Interfaces:
Cloneable
,AbortableHttpRequest
,Configurable
,HttpExecutionAware
,HttpUriRequest
,HttpEntityEnclosingRequest
,HttpMessage
,HttpRequest
- Direct Known Subclasses:
HttpBind
,HttpCheckin
,HttpCheckout
,HttpCopy
,HttpDelete
,HttpLabel
,HttpLock
,HttpMerge
,HttpMkcol
,HttpMkworkspace
,HttpMove
,HttpOrderpatch
,HttpPoll
,HttpPropfind
,HttpProppatch
,HttpRebind
,HttpReport
,HttpSearch
,HttpSubscribe
,HttpUnbind
,HttpUnlock
,HttpUnsubscribe
,HttpUpdate
,HttpVersionControl
Base class for HTTP request classes defined in this package.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkSuccess
(HttpResponse response) Check the response and throw when it is considered to represent a failure.getResponseBodyAsDocument
(HttpEntity entity) Gets aDocument
representing the response body.getResponseBodyAsEventDiscovery
(HttpResponse response) Return response body asEventDiscovery
object.getResponseBodyAsLockDiscovery
(HttpResponse response) Return response body asLockDiscovery
object.getResponseBodyAsMultiStatus
(HttpResponse response) Return response body asMultiStatus
object.Return response body asSubscriptionDiscovery
object.getResponseException
(HttpResponse response) Obtain aDavException
representing the response.boolean
succeeded
(HttpResponse response) Check the providedHttpResponse
for successful execution.Methods inherited from class org.apache.http.client.methods.HttpEntityEnclosingRequestBase
clone, expectContinue, getEntity, setEntity
Methods inherited from class org.apache.http.client.methods.HttpRequestBase
getConfig, getMethod, getProtocolVersion, getRequestLine, getURI, releaseConnection, setConfig, setProtocolVersion, setURI, started, toString
Methods inherited from class org.apache.http.client.methods.AbstractExecutionAwareRequest
abort, completed, isAborted, reset, setCancellable, setConnectionRequest, setReleaseTrigger
Methods inherited from class org.apache.http.message.AbstractHttpMessage
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.http.HttpMessage
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, getProtocolVersion, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams
Methods inherited from interface org.apache.http.HttpRequest
getRequestLine
Methods inherited from interface org.apache.http.client.methods.HttpUriRequest
abort, isAborted
-
Constructor Details
-
BaseDavRequest
-
-
Method Details
-
getResponseBodyAsDocument
Gets aDocument
representing the response body.- Returns:
- document or
null
for null entity - Throws:
IOException
- in case of I/O or XMP pasting problems
-
getResponseBodyAsMultiStatus
Return response body asMultiStatus
object.- Throws:
IllegalStateException
- when response does not represent aMultiStatus
DavException
- for failures in obtaining/parsing the response body
-
getResponseBodyAsLockDiscovery
Return response body asLockDiscovery
object.- Throws:
IllegalStateException
- when response does not represent aLockDiscovery
DavException
- for failures in obtaining/parsing the response body
-
getResponseBodyAsSubscriptionDiscovery
public SubscriptionDiscovery getResponseBodyAsSubscriptionDiscovery(HttpResponse response) throws DavException Return response body asSubscriptionDiscovery
object.- Throws:
IllegalStateException
- when response does not represent aSubscriptionDiscovery
DavException
- for failures in obtaining/parsing the response body
-
getResponseBodyAsEventDiscovery
Return response body asEventDiscovery
object.- Throws:
IllegalStateException
- when response does not represent aEventDiscovery
DavException
- for failures in obtaining/parsing the response body
-
checkSuccess
Check the response and throw when it is considered to represent a failure.- Throws:
DavException
-
getResponseException
Obtain aDavException
representing the response.- Throws:
IllegalStateException
- when the response is considered to be successful
-
succeeded
Check the providedHttpResponse
for successful execution. The default implementation treats all 2xx status codes (RFC 7231, Section 6.3). Implementations can further restrict the accepted range of responses (or even check the response body).
-