|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objectorg.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer
public abstract class AbstractBaseAttributeRenderer
Base abstract class that manages authorization to display the attribute.
| Field Summary | |
|---|---|
protected TilesApplicationContext |
applicationContext
The Tiles application context. |
protected TilesContextFactory |
contextFactory
The Tiles context factory. |
protected AttributeEvaluator |
evaluator
The attribute evaluator. |
| Constructor Summary | |
|---|---|
AbstractBaseAttributeRenderer()
|
|
| Method Summary | |
|---|---|
protected TilesRequestContext |
getRequestContext(java.lang.Object... requestItems)
Creates a Tiles request context from request items. |
protected boolean |
isPermitted(TilesRequestContext request,
java.util.Set<java.lang.String> roles)
Checks if the current user is in one of the comma-separated roles specified in the role parameter. |
void |
render(Attribute attribute,
java.io.Writer writer,
java.lang.Object... requestItems)
Renders an attribute. |
void |
setApplicationContext(TilesApplicationContext applicationContext)
Sets the Tiles application context. |
void |
setContextFactory(TilesContextFactory contextFactory)
Sets the Tiles context factory. |
void |
setEvaluator(AttributeEvaluator evaluator)
Sets the evaluator. |
abstract void |
write(java.lang.Object value,
Attribute attribute,
java.io.Writer writer,
TilesRequestContext request,
java.lang.Object... requestItems)
Implement this method knowing that the attribute won't be null and it will be authorized. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected TilesContextFactory contextFactory
protected TilesApplicationContext applicationContext
protected AttributeEvaluator evaluator
| Constructor Detail |
|---|
public AbstractBaseAttributeRenderer()
| Method Detail |
|---|
public void setContextFactory(TilesContextFactory contextFactory)
setContextFactory in interface TilesContextFactoryAwarecontextFactory - The Tiles context factory.public void setApplicationContext(TilesApplicationContext applicationContext)
setApplicationContext in interface TilesApplicationContextAwareapplicationContext - The Tiles application context.public void setEvaluator(AttributeEvaluator evaluator)
setEvaluator in interface AttributeEvaluatorAwareevaluator - The evaluator to set.
public void render(Attribute attribute,
java.io.Writer writer,
java.lang.Object... requestItems)
throws java.io.IOException
render in interface AttributeRendererattribute - The attribute to render.writer - The writer to use.requestItems - The request items.
java.io.IOException - If something goes wrong during rendition.
public abstract void write(java.lang.Object value,
Attribute attribute,
java.io.Writer writer,
TilesRequestContext request,
java.lang.Object... requestItems)
throws java.io.IOException
value - The value of the attribute to be rendered.attribute - The attribute to render.writer - The writer to use.request - The Tiles request object.requestItems - The original request items.
java.io.IOException - If something goes wrong during rendition.protected TilesRequestContext getRequestContext(java.lang.Object... requestItems)
requestItems - The request items.
protected boolean isPermitted(TilesRequestContext request,
java.util.Set<java.lang.String> roles)
role parameter.
request - The request context.roles - The list of roles.
true if the current user is in one of those roles.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||