|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.abstracthorizon.danube.webdav.xml.dav.response.MultiStatus
public class MultiStatus
This class represents multistatus response tag as defined in RFC-2518.
It can render multistatus response xml but also can set HTTPConnection
headers
in a simple no content response or render partial content as required by some
functions.
Field Summary | |
---|---|
protected boolean |
committed
Is stauts already sent to the connection |
protected boolean |
headerResponse
Is it header response only or proper multistatus xml |
protected HTTPConnection |
httpConnection
HTTP connection status is going to render response to |
static Status |
MULTISTATUS_RESPONSE
Mutlistatus response status 207 |
protected NamespacesProvider |
provider
Namespace provider |
protected List<Response> |
responses
List of responses |
Constructor Summary | |
---|---|
MultiStatus(NamespacesProvider provider,
HTTPConnection connection)
Constructor |
Method Summary | |
---|---|
Response |
addSimpleResponse(Status status)
Adds simple response |
void |
commit()
Sets commit flag to true |
HTTPConnection |
getHTTPConnection()
Returns http connection |
String |
getResponseProtocol()
Returns http connection's response protocol |
List<Response> |
getResponses()
Returns responses |
boolean |
isCommitted()
Returns commited flag |
boolean |
isHeaderResponse()
Returns is it header only response |
HRef |
newHRef()
Creates new href of request's URL |
HRef |
newHRef(String path)
Creates new href of relative path of request's URL |
Response |
newResponse()
Creates new response with href of request's URL |
Response |
newResponse(String path)
Creates new response with href of relative path of request's URL |
void |
render()
Renders with true for force mutlistatus flag |
void |
render(boolean forceMultistatus)
Renders this object to http connection |
static void |
renderNamespaces(PrintWriter writer,
NamespacesProvider provider)
Renders namespaces |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Status MULTISTATUS_RESPONSE
protected HTTPConnection httpConnection
protected boolean committed
protected boolean headerResponse
protected NamespacesProvider provider
protected List<Response> responses
Constructor Detail |
---|
public MultiStatus(NamespacesProvider provider, HTTPConnection connection)
provider
- namespace providerconnection
- connection to be rendered toMethod Detail |
---|
public void commit()
true
public boolean isCommitted()
public boolean isHeaderResponse()
true
if it is header only responsepublic List<Response> getResponses()
public HTTPConnection getHTTPConnection()
public String getResponseProtocol()
public void render()
true
for force mutlistatus flag
public void render(boolean forceMultistatus)
forceMultistatus
- if true
then it is rendered as mutlistatus. Otherwise it can
return header only or partial xml responsepublic static void renderNamespaces(PrintWriter writer, NamespacesProvider provider)
writer
- writerprovider
- namespace providerpublic Response addSimpleResponse(Status status)
status
- status
public Response newResponse()
public Response newResponse(String path)
path
- relative path from request's URL
public HRef newHRef()
public HRef newHRef(String path)
path
- path
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |