|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Viewer
A Viewer
object represents a template with a
set of properties. This represents a template loaded from some
source that can have specific properties set to configure a
rendering of the template acquired from the templating system.
This interface attempts to encapsulate the functionality provided by the templating system in an independant manner. This achieves two things, it ensures that the controller is not tightly coupled to the templating system and ensures that firmiliarity with the templating system's API is not required.
Method Summary | |
---|---|
java.lang.String |
getCharset()
This provides the character encoding of the page. |
java.lang.String |
getContentType()
This is used to acquire a HTTP Content-Type header, which can be used to describe the contents of the viewer. |
void |
write(java.io.PrintWriter out)
Displays the contents of the generated template output to the issued Writer . |
Methods inherited from interface simple.template.Database |
---|
contains, get, keySet, put, remove |
Method Detail |
---|
void write(java.io.PrintWriter out) throws java.lang.Exception
Writer
. This encapsulates the means
of rendering the template to a single method. Internally
the properties that are set within the document will be
used to configure the template, enabling dynamic output.
If there are any problems parsing the template or emitting its contents an exception is thrown. However, if it is successfully processed it will be written to the issued output, which should remain unflushed for performance.
out
- the output to write the template rendering to
java.lang.Exception
- thrown if there is a problem parsing or
emitting the templatejava.lang.String getContentType()
java.lang.String getCharset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |