org.apache.webdav.lib.methods

Class CopyMethod


public class CopyMethod
extends XMLResponseMethodBase

COPY 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

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

builder, decodeResponseHrefs, responseURLs

Constructor Summary

CopyMethod()
Method constructor.
CopyMethod(String source)
Method constructor.
CopyMethod(String source, String destination)
Method constructor.
CopyMethod(String source, String destination, boolean overwrite)
Method constructor.
CopyMethod(String source, String destination, boolean overwrite, int depth)

Method Summary

void
addRequestHeaders(HttpState state, HttpConnection conn)
Generate additional headers needed by the request.
int
getDepth()
Depth getter.
String
getDestination()
Destination getter.
String
getName()
boolean
getOverwrite()
Overwrite getter.
boolean
isOverwrite()
Overwrite getter.
void
setDepth(int depth)
Depth setter.
void
setDestination(String destination)
Destination setter.
void
setOverwrite(boolean overwrite)
Overwrite setter.
void
setRequestHeader(String headerName, String headerValue)
Set a header value, redirecting the special case of Overwrite and Destination headers to setOverwrite(boolean) and setDestination(String) as appropriate.

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

CopyMethod

public CopyMethod()
Method constructor.

CopyMethod

public CopyMethod(String source)
Method constructor.

CopyMethod

public CopyMethod(String source,
                  String destination)
Method constructor.

CopyMethod

public CopyMethod(String source,
                  String destination,
                  boolean overwrite)
Method constructor.

CopyMethod

public CopyMethod(String source,
                  String destination,
                  boolean overwrite,
                  int depth)

Method Details

addRequestHeaders

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

getDepth

public int getDepth()
Depth getter.
Returns:
int Depth value

getDestination

public String getDestination()
Destination getter.
Returns:
String destination value

getName

public String getName()

getOverwrite

public boolean getOverwrite()
Overwrite getter.
Returns:
boolean Overwrite value

isOverwrite

public boolean isOverwrite()
Overwrite getter.
Returns:
boolean Overwrite value

setDepth

public void setDepth(int depth)
Depth setter.
Parameters:
depth - New depth value

setDestination

public void setDestination(String destination)
Destination setter.
Parameters:
destination - New destination value

setOverwrite

public void setOverwrite(boolean overwrite)
Overwrite setter.
Parameters:
overwrite - New overwrite value

setRequestHeader

public void setRequestHeader(String headerName,
                             String headerValue)
Parameters:
headerName - Header name
headerValue - Header value