pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.webdav.response
Class MultiStatusResponse

java.lang.Object
  extended by org.torweg.pulse.webdav.response.MultiStatusResponse
Direct Known Subclasses:
PropFindResponse, PropNameResponse, PropPatchResponse, VFSPropFindResponse, VFSPropNameResponse

public class MultiStatusResponse
extends java.lang.Object

base class for MultiStatus multiStatusElements.

Version:
$Revision: 1984 $
Author:
Thomas Weber

Constructor Summary
MultiStatusResponse(HttpDAVServletResponse resp)
          creates an empty MultiStatusResponse.
 
Method Summary
 void add(AbstractResponseElement el)
          adds a response element to the current multi-status response.
 void closeResponse()
          closes the multi-status response and flushes all buffers.
protected  java.lang.String getCleanURIString(VirtualFile file, VFSDAVStore store)
          returns a clean URI string for the given VirtualFile.
 boolean isEmpty()
          returns whether the MultiStatusResponse contains elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiStatusResponse

public MultiStatusResponse(HttpDAVServletResponse resp)
creates an empty MultiStatusResponse.

Parameters:
resp - the response for sending the multi-status
Method Detail

getCleanURIString

protected java.lang.String getCleanURIString(VirtualFile file, VFSDAVStore store)
returns a clean URI string for the given VirtualFile.

Parameters:
file - the file
store - the store
Returns:
the cleaned URI as a string

add

public final void add(AbstractResponseElement el)
adds a response element to the current multi-status response.

Parameters:
el - the element to add

closeResponse

public final void closeResponse()
                         throws java.io.IOException
closes the multi-status response and flushes all buffers.

Throws:
java.io.IOException - on errors sending the response to the client

isEmpty

public final boolean isEmpty()
returns whether the MultiStatusResponse contains elements.

Returns:
true, if and only if, the response contains response elements. Otherwise false.