org.apache.webdav.lib.methods

Class PropPatchMethod


public class PropPatchMethod
extends XMLResponseMethodBase

PROPPATCH Method.

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase

XMLResponseMethodBase.OptionsResponse, XMLResponseMethodBase.Response, XMLResponseMethodBase.ResponseWithinMultistatus, XMLResponseMethodBase.SingleResponse

Field Summary

protected Hashtable
toRemove
Hashtable of the properties to remove.
protected Hashtable
toSet
Hashtable of the properties to set.

Fields inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase

builder, decodeResponseHrefs, responseURLs

Constructor Summary

PropPatchMethod()
Method constructor.
PropPatchMethod(String path)
Method constructor.

Method Summary

void
addPropertyToRemove(String name)
Add property to remove.
void
addPropertyToRemove(String name, String namespace, String namespaceInfo)
Add property to remove.
void
addPropertyToSet(String name, String value)
Add a new property to set.
void
addPropertyToSet(String name, String value, String namespace, String namespaceInfo)
Add a new property to set.
void
addRequestHeaders(HttpState state, HttpConnection conn)
Generate additional headers needed by the request.
protected String
generateRequestBody()
DAV requests that contain a body must override this function to generate that body.
String
getName()
void
parseResponse(InputStream input, HttpState state, HttpConnection conn)
Parse response.

Methods inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase

convertElementToProperty, generateRequestBody, getDebug, getRequestContentLength, getResponseDocument, getResponseHashtable, getResponseURLs, getResponses, parseResponse, parseXMLResponse, readResponseBody, recycle, setDebug, setDecodeResponseHrefs, setDocument, setResponseHashtable, writeRequestBody

Methods inherited from class org.apache.webdav.lib.methods.HttpRequestBodyMethodBase

getRequestContentLength, isRequestContentAlreadySet, readContinueCode, recycle, setRequestBody, setRequestBody, setRequestBody, setRequestBody, setRequestBody, writeRequestBody

Field Details

toRemove

protected Hashtable toRemove
Hashtable of the properties to remove.

toSet

protected Hashtable toSet
Hashtable of the properties to set.

Constructor Details

PropPatchMethod

public PropPatchMethod()
Method constructor.

PropPatchMethod

public PropPatchMethod(String path)
Method constructor.

Method Details

addPropertyToRemove

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

addPropertyToRemove

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

addPropertyToSet

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

addPropertyToSet

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

addRequestHeaders

public void addRequestHeaders(HttpState state,
                              HttpConnection conn)
            throws IOException,
                   HttpException
Generate additional headers needed by the request.
Parameters:
state - State token
conn - the connection

generateRequestBody

protected 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 interface XMLResponseMethodBase

getName

public String getName()

parseResponse

public void parseResponse(InputStream input,
                          HttpState state,
                          HttpConnection conn)
            throws IOException,
                   HttpException
Parse response.
Overrides:
parseResponse in interface XMLResponseMethodBase
Parameters:
input - Input stream