public abstract class BaseDavRequest
extends org.apache.http.client.methods.HttpEntityEnclosingRequestBase
Constructor and Description |
---|
BaseDavRequest(java.net.URI uri) |
Modifier and Type | Method and Description |
---|---|
void |
checkSuccess(org.apache.http.HttpResponse response)
Check the response and throw when it is considered to represent a failure.
|
org.w3c.dom.Document |
getResponseBodyAsDocument(org.apache.http.HttpEntity entity)
Gets a
Document representing the response body. |
EventDiscovery |
getResponseBodyAsEventDiscovery(org.apache.http.HttpResponse response)
Return response body as
EventDiscovery object. |
LockDiscovery |
getResponseBodyAsLockDiscovery(org.apache.http.HttpResponse response)
Return response body as
LockDiscovery object. |
MultiStatus |
getResponseBodyAsMultiStatus(org.apache.http.HttpResponse response)
Return response body as
MultiStatus object. |
SubscriptionDiscovery |
getResponseBodyAsSubscriptionDiscovery(org.apache.http.HttpResponse response)
Return response body as
SubscriptionDiscovery object. |
DavException |
getResponseException(org.apache.http.HttpResponse response)
Obtain a
DavException representing the response. |
boolean |
succeeded(org.apache.http.HttpResponse response)
Check the provided
HttpResponse for successful execution. |
clone, expectContinue, getEntity, setEntity
getConfig, getMethod, getProtocolVersion, getRequestLine, getURI, releaseConnection, setConfig, setProtocolVersion, setURI, started, toString
abort, completed, isAborted, reset, setCancellable, setConnectionRequest, setReleaseTrigger
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public org.w3c.dom.Document getResponseBodyAsDocument(org.apache.http.HttpEntity entity) throws java.io.IOException
Document
representing the response body.null
for null entityjava.io.IOException
- in case of I/O or XMP pasting problemspublic MultiStatus getResponseBodyAsMultiStatus(org.apache.http.HttpResponse response) throws DavException
MultiStatus
object.java.lang.IllegalStateException
- when response does not represent a MultiStatus
DavException
- for failures in obtaining/parsing the response bodypublic LockDiscovery getResponseBodyAsLockDiscovery(org.apache.http.HttpResponse response) throws DavException
LockDiscovery
object.java.lang.IllegalStateException
- when response does not represent a LockDiscovery
DavException
- for failures in obtaining/parsing the response bodypublic SubscriptionDiscovery getResponseBodyAsSubscriptionDiscovery(org.apache.http.HttpResponse response) throws DavException
SubscriptionDiscovery
object.java.lang.IllegalStateException
- when response does not represent a SubscriptionDiscovery
DavException
- for failures in obtaining/parsing the response bodypublic EventDiscovery getResponseBodyAsEventDiscovery(org.apache.http.HttpResponse response) throws DavException
EventDiscovery
object.java.lang.IllegalStateException
- when response does not represent a EventDiscovery
DavException
- for failures in obtaining/parsing the response bodypublic void checkSuccess(org.apache.http.HttpResponse response) throws DavException
DavException
public DavException getResponseException(org.apache.http.HttpResponse response)
DavException
representing the response.java.lang.IllegalStateException
- when the response is considered to be successfulpublic boolean succeeded(org.apache.http.HttpResponse response)
HttpResponse
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).Copyright © 2010 - 2020 Adobe. All Rights Reserved