|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjuzu.template.Template.Builder
public class Template.Builder
A builder providing a fluent syntax for rendering a template.
| Constructor Summary | |
|---|---|
Template.Builder()
|
|
| Method Summary | ||
|---|---|---|
Template.Builder |
locale(Locale locale)
Update the locale. |
|
Response.Render |
notFound()
Renders the template and returns a response with the not found status. |
|
Response.Render |
ok()
Renders the template and set the response on the current MimeContext. |
|
void |
render()
Renders the template and set the response on the current MimeContext |
|
|
renderTo(A appendable)
Renders the template to the specified appendable. |
|
void |
renderTo(Stream.Char printer)
Renders the template to the specified printer. |
|
Template.Builder |
set(String name,
Object value)
Update a parameter, if the value is not null the parameter with the specified name is set, otherwise the parameter is removed. |
|
Response.Render |
status(int status)
Renders the template and returns a response with the specified status. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Template.Builder()
| Method Detail |
|---|
public Template.Builder locale(Locale locale)
locale - the new locale
public Template.Builder set(String name,
Object value)
throws NullPointerException
name - the parameter namevalue - the parameter value
NullPointerException - if the name argument is nullpublic final Response.Render ok()
MimeContext.
public final Response.Render notFound()
public final Response.Render status(int status)
public <A extends Appendable> A renderTo(A appendable)
throws TemplateExecutionException,
UndeclaredIOException
appendable - the appendable
TemplateExecutionException - any execution exception
UndeclaredIOException - any io exception
public void renderTo(Stream.Char printer)
throws TemplateExecutionException,
UndeclaredIOException
printer - the printer
TemplateExecutionException - any execution exception
UndeclaredIOException - any io exception
public void render()
throws TemplateExecutionException,
UndeclaredIOException
MimeContext
TemplateExecutionException
UndeclaredIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||