Class PropPatchMethod

  • All Implemented Interfaces:
    org.apache.commons.httpclient.HttpMethod

    public class PropPatchMethod
    extends XMLResponseMethodBase
    PROPPATCH Method.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Hashtable toRemove
      Hashtable of the properties to remove.
      protected java.util.Hashtable toSet
      Hashtable of the properties to set.
      • Fields inherited from class org.apache.commons.httpclient.HttpMethodBase

        effectiveVersion, statusLine
    • Constructor Summary

      Constructors 
      Constructor Description
      PropPatchMethod()
      Method constructor.
      PropPatchMethod​(java.lang.String path)
      Method constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addPropertyToRemove​(java.lang.String name)
      Add property to remove.
      void addPropertyToRemove​(java.lang.String name, java.lang.String namespace, java.lang.String namespaceInfo)
      Add property to remove.
      void addPropertyToSet​(java.lang.String name, java.lang.String value)
      Add a new property to set.
      void addPropertyToSet​(java.lang.String name, java.lang.String value, java.lang.String namespace, java.lang.String namespaceInfo)
      Add a new property to set.
      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.lang.String getName()  
      void parseResponse​(java.io.InputStream input, org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.HttpConnection conn)
      Parse response.
      • Methods inherited from class org.apache.commons.httpclient.HttpMethodBase

        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, setRequestHeader, setResponseStream, setStrictMode, setURI, shouldCloseConnection, validate, writeRequest, writeRequestHeaders, writeRequestLine
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • toSet

        protected java.util.Hashtable toSet
        Hashtable of the properties to set.
      • toRemove

        protected java.util.Hashtable toRemove
        Hashtable of the properties to remove.
    • Constructor Detail

      • PropPatchMethod

        public PropPatchMethod()
        Method constructor.
      • PropPatchMethod

        public PropPatchMethod​(java.lang.String path)
        Method constructor.
    • Method Detail

      • addPropertyToSet

        public void addPropertyToSet​(java.lang.String name,
                                     java.lang.String value)
        Add a new property to set.
        Parameters:
        name - Property name
        value - Property value
      • addPropertyToSet

        public void addPropertyToSet​(java.lang.String name,
                                     java.lang.String value,
                                     java.lang.String namespace,
                                     java.lang.String namespaceInfo)
        Add a new property to set.
        Parameters:
        name - Property name
        value - Property value
        namespace - Namespace abbreviation
        namespaceInfo - Namespace information
      • addPropertyToRemove

        public void addPropertyToRemove​(java.lang.String name)
        Add property to remove.
        Parameters:
        name - Property name
      • addPropertyToRemove

        public void addPropertyToRemove​(java.lang.String name,
                                        java.lang.String namespace,
                                        java.lang.String namespaceInfo)
        Add property to remove.
        Parameters:
        name - Property name
        namespace - Namespace abbreviation
        namespaceInfo - Namespace information
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface org.apache.commons.httpclient.HttpMethod
        Specified by:
        getName in class org.apache.commons.httpclient.HttpMethodBase
      • addRequestHeaders

        public void addRequestHeaders​(org.apache.commons.httpclient.HttpState state,
                                      org.apache.commons.httpclient.HttpConnection conn)
                               throws java.io.IOException,
                                      org.apache.commons.httpclient.HttpException
        Generate additional headers needed by the request.
        Overrides:
        addRequestHeaders in class org.apache.commons.httpclient.HttpMethodBase
        Parameters:
        state - State token
        conn - the connection
        Throws:
        java.io.IOException
        org.apache.commons.httpclient.HttpException
      • generateRequestBody

        protected java.lang.String generateRequestBody()
        DAV requests that contain a body must override this function to generate that body.

        The default behavior simply returns an empty body.

        Overrides:
        generateRequestBody in class XMLResponseMethodBase
      • parseResponse

        public void parseResponse​(java.io.InputStream input,
                                  org.apache.commons.httpclient.HttpState state,
                                  org.apache.commons.httpclient.HttpConnection conn)
                           throws java.io.IOException,
                                  org.apache.commons.httpclient.HttpException
        Parse response.
        Overrides:
        parseResponse in class XMLResponseMethodBase
        Parameters:
        input - Input stream
        Throws:
        java.io.IOException
        org.apache.commons.httpclient.HttpException