public interface Result
| Modifier and Type | Method and Description |
|---|---|
<T> T |
forwardTo(Class<T> controller)
A shortcut to result.use(logic()).forwardTo(controller)
|
void |
forwardTo(String uri)
A shortcut to result.use(page()).forwardTo(uri);
|
<T> T |
forwardTo(T controller)
A shortcut to result.use(logic()).forwardTo(controller.getClass())
so you can use on your controller:
result.forwardTo(this).aMethod(); |
Result |
include(Object value)
Stores an attribute in the result.
|
Result |
include(String key,
Object value)
Stores an attribute in the result.
|
Map<String,Object> |
included()
Return all included attributes via Result.include();
|
void |
notFound()
A shortcut to result.use(status()).notFound();
|
void |
nothing()
A shortcut to result.use(nothing())
|
<T> T |
of(Class<T> controller)
A shortcut to result.use(page()).of(controller)
|
<T> T |
of(T controller)
A shortcut to result.use(page()).of(controller.getClass())
so you can use on your controller:
result.of(this).aMethod(); |
Result |
on(Class<? extends Exception> exception)
Add an
Exception to be handled by Exception Handler. |
<T> T |
permanentlyRedirectTo(Class<T> controller)
A shortcut to result.use(status()).movedPermanentlyTo(controller).
|
void |
permanentlyRedirectTo(String uri)
A shortcut to result.use(status()).movedPermanentlyTo(uri).
|
<T> T |
permanentlyRedirectTo(T controller)
A shortcut to result.use(status()).movedPermanentlyTo(controller.getClass()).
|
<T> T |
redirectTo(Class<T> controller)
A shortcut to result.use(logic()).redirectTo(controller)
|
void |
redirectTo(String uri)
A shortcut to result.use(page()).redirectTo(uri);
|
<T> T |
redirectTo(T controller)
A shortcut to result.use(logic()).redirectTo(controller.getClass())
so you can use on your controller:
result.redirectTo(this).aMethod(); |
<T extends View> |
use(Class<T> view)
Force result to use the defined view.
|
boolean |
used()
Whether this result was used.
|
Result include(String key, Object value)
key - a String specifying the key of the attributevalue - the object to be storedResult include(Object value)
value - the object to be storedTypeNameExtractorResult on(Class<? extends Exception> exception)
Exception to be handled by Exception Handler.exception - The exception to handle.boolean used()
Map<String,Object> included()
void forwardTo(String uri)
PageResult.forwardTo(String)void redirectTo(String uri)
PageResult.forwardTo(String)<T> T forwardTo(Class<T> controller)
controller - LogicResult.forwardTo(Class)<T> T redirectTo(Class<T> controller)
controller - LogicResult.redirectTo(Class)<T> T of(Class<T> controller)
controller - PageResult.of(Class)<T> T redirectTo(T controller)
controller - LogicResult.redirectTo(Class)<T> T forwardTo(T controller)
controller - LogicResult.forwardTo(Class)<T> T of(T controller)
controller - PageResult.of(Class)void nothing()
void notFound()
void permanentlyRedirectTo(String uri)
uri - Status.movedPermanentlyTo(String)<T> T permanentlyRedirectTo(Class<T> controller)
controller - Status.movedPermanentlyTo(Class)<T> T permanentlyRedirectTo(T controller)
controller - Status.movedPermanentlyTo(Class)Copyright © 2014 Caelum. All rights reserved.