|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.could.webdav.DAVTransaction
A simple wrapper isolating the Java Servlet API from this WebDAV implementation.
Field Summary | |
static int |
INFINITY
The identifyication of the infinity value
in the Depth header. |
Constructor Summary | |
DAVTransaction(ServletRequest request,
ServletResponse response)
Create a new DAVTransaction instance. |
Method Summary | |
int |
getDepth()
Return the depth requested by the client for this transaction. |
URI |
getDestination()
Return a URI |
Date |
getIfModifiedSince()
Check if the client requested a date-based conditional operation. |
String |
getMethod()
Return the path originally requested by the client. |
String |
getNormalizedPath()
Return the path originally requested by the client. |
String |
getOriginalPath()
Return the path originally requested by the client. |
boolean |
getOverwrite()
Return the overwrite flag requested by the client for this transaction. |
int |
getStatus()
Set the HTTP status code of the response. |
boolean |
hasRequestBody()
Check if there is a body in the request. |
URI |
lookup(DAVResource resource)
Look up the final URI of a DAVResource as visible from the
HTTP client requesting this transaction. |
InputStream |
read()
Read from the body of the original request. |
void |
setContentType(String type)
Set the HTTP Content-Type header. |
void |
setHeader(String name,
String value)
Set an HTTP header in the response. |
void |
setStatus(int status)
Set the HTTP status code of the response. |
OutputStream |
write()
Write the body of the response. |
PrintWriter |
write(String encoding)
Write the body of the response. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int INFINITY
The identifyication of the infinity
value
in the Depth
header.
Constructor Detail |
public DAVTransaction(ServletRequest request, ServletResponse response) throws ServletException
Create a new DAVTransaction
instance.
Method Detail |
public String getMethod()
Return the path originally requested by the client.
public String getOriginalPath()
Return the path originally requested by the client.
public String getNormalizedPath()
Return the path originally requested by the client.
public int getDepth()
Return the depth requested by the client for this transaction.
public URI getDestination()
Return a URI
public boolean getOverwrite()
Return the overwrite flag requested by the client for this transaction.
public Date getIfModifiedSince()
Check if the client requested a date-based conditional operation.
public void setStatus(int status)
Set the HTTP status code of the response.
public int getStatus()
Set the HTTP status code of the response.
public void setContentType(String type)
Set the HTTP Content-Type
header.
public void setHeader(String name, String value)
Set an HTTP header in the response.
public boolean hasRequestBody() throws IOException
Check if there is a body in the request.
This method differs from checking if the return value of the
read()
method is not null as a request body of length
zero will return false in this case, while in the read()
method will return an empty InputStream
.
IOException
public InputStream read() throws IOException
Read from the body of the original request.
IOException
public OutputStream write() throws IOException
Write the body of the response.
IOException
public PrintWriter write(String encoding) throws IOException
Write the body of the response.
IOException
public URI lookup(DAVResource resource)
Look up the final URI of a DAVResource
as visible from the
HTTP client requesting this transaction.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |