org.apache.webdav.lib.methods

Class UpdateMethod


public class UpdateMethod
extends XMLResponseMethodBase

The Update method updates a version-controlled resource to a new version. Two parameters are required, the path of the resource, and a URI identifying the version from the history to which to update.

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

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

builder, decodeResponseHrefs, responseURLs

Constructor Summary

UpdateMethod()
Method constructor.
UpdateMethod(String path)
Method constructor.
UpdateMethod(String path, String target)
Method constructor.

Method Summary

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

Constructor Details

UpdateMethod

public UpdateMethod()
Method constructor.

UpdateMethod

public UpdateMethod(String path)
Method constructor.

UpdateMethod

public UpdateMethod(String path,
                    String target)
Method constructor.
Parameters:
path -
target -

Method Details

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