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 TypeMethodDescriptionvoidcheckSuccess(HttpResponse response) Check the response and throw when it is considered to represent a failure.getResponseBodyAsDocument(HttpEntity entity) Gets aDocumentrepresenting the response body.getResponseBodyAsEventDiscovery(HttpResponse response) Return response body asEventDiscoveryobject.getResponseBodyAsLockDiscovery(HttpResponse response) Return response body asLockDiscoveryobject.getResponseBodyAsMultiStatus(HttpResponse response) Return response body asMultiStatusobject.Return response body asSubscriptionDiscoveryobject.getResponseException(HttpResponse response) Obtain aDavExceptionrepresenting the response.booleansucceeded(HttpResponse response) Check the providedHttpResponsefor successful execution.Methods inherited from class org.apache.http.client.methods.HttpEntityEnclosingRequestBase
clone, expectContinue, getEntity, setEntityMethods inherited from class org.apache.http.client.methods.HttpRequestBase
getConfig, getMethod, getProtocolVersion, getRequestLine, getURI, releaseConnection, setConfig, setProtocolVersion, setURI, started, toStringMethods inherited from class org.apache.http.client.methods.AbstractExecutionAwareRequest
abort, completed, isAborted, reset, setCancellable, setConnectionRequest, setReleaseTriggerMethods inherited from class org.apache.http.message.AbstractHttpMessage
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParamsMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.http.HttpMessage
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, getProtocolVersion, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParamsMethods inherited from interface org.apache.http.HttpRequest
getRequestLineMethods inherited from interface org.apache.http.client.methods.HttpUriRequest
abort, isAborted
-
Constructor Details
-
BaseDavRequest
-
-
Method Details
-
getResponseBodyAsDocument
Gets aDocumentrepresenting the response body.- Returns:
- document or
nullfor null entity - Throws:
IOException- in case of I/O or XMP pasting problems
-
getResponseBodyAsMultiStatus
Return response body asMultiStatusobject.- Throws:
IllegalStateException- when response does not represent aMultiStatusDavException- for failures in obtaining/parsing the response body
-
getResponseBodyAsLockDiscovery
Return response body asLockDiscoveryobject.- Throws:
IllegalStateException- when response does not represent aLockDiscoveryDavException- for failures in obtaining/parsing the response body
-
getResponseBodyAsSubscriptionDiscovery
public SubscriptionDiscovery getResponseBodyAsSubscriptionDiscovery(HttpResponse response) throws DavException Return response body asSubscriptionDiscoveryobject.- Throws:
IllegalStateException- when response does not represent aSubscriptionDiscoveryDavException- for failures in obtaining/parsing the response body
-
getResponseBodyAsEventDiscovery
Return response body asEventDiscoveryobject.- Throws:
IllegalStateException- when response does not represent aEventDiscoveryDavException- 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 aDavExceptionrepresenting the response.- Throws:
IllegalStateException- when the response is considered to be successful
-
succeeded
Check the providedHttpResponsefor 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).
-