|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Tile
The Tile
object is used to represent a value that
has been acquired from a Source
. The reason the
source value cannot be entered directly into the template is
because if there are ever extentions to this framework they
need to be made in a way that will not break compatibility with
existing implementations. Also, directly submitting the source
value means that the full graph of documents needs to be made
before anything is referenced within the template.
This object allows a lazy approach to be taken with regards to the graph building process. Only tiles that are referenced or used within the template will need their source value, and so, only those tiles will extract the source value. Another benifit to this is that it will reduce the problems caused with recursive references. If only nodes referenced within the template acquire the source value, then all documents can have references to themselves without initiating recursion.
Method Summary | |
---|---|
java.lang.String |
getName()
This provides the name of the tile which is the same name as the Source it wraps. |
java.lang.Object |
getValue()
This method causes the Source.getValue method
to be invoked. |
java.lang.String |
toString()
This invokes the toString method of the source
value. |
void |
write(java.io.PrintWriter out)
This is used to write the contents of the tile to the provided writer. |
Method Detail |
---|
java.lang.String getName()
Source
it wraps. This is useful if the
tile needs to be inserted into a List
as it
will allow a template to determine the tile it represents.
void write(java.io.PrintWriter out)
out
- this is the print writer to write the tile tojava.lang.Object getValue()
Source.getValue
method
to be invoked. This will extract the value from the source
when referenced from within a template. This initiates
a further branch of the document graph to be created.
java.lang.String toString()
toString
method of the source
value. Typically objects inserted into the template by the
document definition are viewable objects, such as headings
or other templates. This makes it easy for those values
to be presented within a template, a simple reference to
the Tile
will cause this method to be invoked.
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |