|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.barracudamvc.core.util.dom.JivanDOMWriter
public class JivanDOMWriter
This class is a specialized DOMWriter for Jivan. It calls the Jivan serializers for output to a Outputstream or java.io.Writer. The root node of the tree to be outputted must be either a Document or Element. This means DocumentFragments are not supported. (other node types don't really make sense here) After printout, the subtree is being repaired and ready to be used again.
Field Summary | |
---|---|
protected String |
contentDisposition
|
protected String |
contentType
|
protected boolean |
leaveWriterOpen
|
protected static org.apache.log4j.Logger |
logger
|
protected int |
maxAge
|
protected boolean |
preventCaching
|
Constructor Summary | |
---|---|
JivanDOMWriter()
Createing a DOMWriter for outputting a DOM created by Jivan |
Method Summary | |
---|---|
String |
getContentDisposition()
Get the content disposition |
String |
getContentType()
Get the content type |
boolean |
getLeaveWriterOpen()
return true if the writer is configured to leave the output stream open |
int |
getMaxAge()
|
boolean |
isPreventCaching()
|
void |
prepareResponse(Node node,
javax.servlet.http.HttpServletResponse resp)
Prepare the response object |
void |
setContentDisposition(String icontentDisposition)
Set the content disposition (ie. |
void |
setContentType(String icontentType)
Set the content type (defaults to "text/html" or "text/xml" depending on the document type |
void |
setLeaveWriterOpen(boolean val)
Set true if we want to leave the writer open (ie. for multiple writes) |
void |
setMaxAge(int maxAge)
|
void |
setPreventCaching(boolean preventCaching)
|
void |
write(Node node,
javax.servlet.http.HttpServletResponse resp)
Write a DOM to a ServletResponse object. |
void |
write(Node node,
OutputStream out)
|
void |
write(Node node,
Writer writer)
output of the Document of this node using a writer for the output. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.log4j.Logger logger
protected boolean preventCaching
protected String contentType
protected String contentDisposition
protected boolean leaveWriterOpen
protected int maxAge
Constructor Detail |
---|
public JivanDOMWriter()
Method Detail |
---|
public void setContentType(String icontentType)
public String getContentType()
public void setContentDisposition(String icontentDisposition)
public String getContentDisposition()
public void setLeaveWriterOpen(boolean val)
setLeaveWriterOpen
in interface DOMWriter
public boolean getLeaveWriterOpen()
getLeaveWriterOpen
in interface DOMWriter
public void prepareResponse(Node node, javax.servlet.http.HttpServletResponse resp) throws IOException
prepareResponse
in interface DOMWriter
node
- the DOM node to be written outresp
- the HttpServletResponse object
IOException
public void write(Node node, javax.servlet.http.HttpServletResponse resp) throws IOException
write
in interface DOMWriter
node
- a DOM node, which belongs to the Document to be written outresp
- the HttpServletResponse object
IOException
public void write(Node node, OutputStream out) throws IOException
write
in interface DOMWriter
IOException
public void write(Node node, Writer writer) throws IOException
write
in interface DOMWriter
IOException
public int getMaxAge()
public void setMaxAge(int maxAge)
maxAge
- The maxAge to set.public boolean isPreventCaching()
public void setPreventCaching(boolean preventCaching)
preventCaching
- The preventCaching to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |