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, org.apache.http.client.methods.AbortableHttpRequest, org.apache.http.client.methods.Configurable, org.apache.http.client.methods.HttpExecutionAware, org.apache.http.client.methods.HttpUriRequest, org.apache.http.HttpEntityEnclosingRequest, org.apache.http.HttpMessage, org.apache.http.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

public abstract class BaseDavRequest extends org.apache.http.client.methods.HttpEntityEnclosingRequestBase
Base class for HTTP request classes defined in this package.
  • Field Summary

    Fields inherited from class org.apache.http.message.AbstractHttpMessage

    headergroup, params
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    checkSuccess(org.apache.http.HttpResponse response)
    Check the response and throw when it is considered to represent a failure.
    getResponseBodyAsDocument(org.apache.http.HttpEntity entity)
    Gets a Document representing the response body.
    org.apache.jackrabbit.webdav.observation.EventDiscovery
    getResponseBodyAsEventDiscovery(org.apache.http.HttpResponse response)
    Return response body as EventDiscovery object.
    org.apache.jackrabbit.webdav.lock.LockDiscovery
    getResponseBodyAsLockDiscovery(org.apache.http.HttpResponse response)
    Return response body as LockDiscovery object.
    getResponseBodyAsMultiStatus(org.apache.http.HttpResponse response)
    Return response body as MultiStatus object.
    org.apache.jackrabbit.webdav.observation.SubscriptionDiscovery
    getResponseBodyAsSubscriptionDiscovery(org.apache.http.HttpResponse response)
    Return response body as SubscriptionDiscovery object.
    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.

    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, finalize, 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

      public BaseDavRequest(URI uri)
  • Method Details

    • getResponseBodyAsDocument

      public Document getResponseBodyAsDocument(org.apache.http.HttpEntity entity) throws IOException
      Gets a Document representing the response body.
      Returns:
      document or null for null entity
      Throws:
      IOException - in case of I/O or XMP pasting problems
    • getResponseBodyAsMultiStatus

      public MultiStatus getResponseBodyAsMultiStatus(org.apache.http.HttpResponse response) throws DavException
      Return response body as MultiStatus object.
      Throws:
      IllegalStateException - when response does not represent a MultiStatus
      DavException - for failures in obtaining/parsing the response body
    • getResponseBodyAsLockDiscovery

      public org.apache.jackrabbit.webdav.lock.LockDiscovery getResponseBodyAsLockDiscovery(org.apache.http.HttpResponse response) throws DavException
      Return response body as LockDiscovery object.
      Throws:
      IllegalStateException - when response does not represent a LockDiscovery
      DavException - for failures in obtaining/parsing the response body
    • getResponseBodyAsSubscriptionDiscovery

      public org.apache.jackrabbit.webdav.observation.SubscriptionDiscovery getResponseBodyAsSubscriptionDiscovery(org.apache.http.HttpResponse response) throws DavException
      Return response body as SubscriptionDiscovery object.
      Throws:
      IllegalStateException - when response does not represent a SubscriptionDiscovery
      DavException - for failures in obtaining/parsing the response body
    • getResponseBodyAsEventDiscovery

      public org.apache.jackrabbit.webdav.observation.EventDiscovery getResponseBodyAsEventDiscovery(org.apache.http.HttpResponse response) throws DavException
      Return response body as EventDiscovery object.
      Throws:
      IllegalStateException - when response does not represent a EventDiscovery
      DavException - for failures in obtaining/parsing the response body
    • checkSuccess

      public void checkSuccess(org.apache.http.HttpResponse response) throws DavException
      Check the response and throw when it is considered to represent a failure.
      Throws:
      DavException
    • getResponseException

      public DavException getResponseException(org.apache.http.HttpResponse response)
      Obtain a DavException representing the response.
      Throws:
      IllegalStateException - when the response is considered to be successful
    • succeeded

      public boolean succeeded(org.apache.http.HttpResponse response)
      Check the provided 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).