com.infodesire.infobit.render.velocity
Class VelocityRenderer

java.lang.Object
  |
  +--com.infodesire.infobit.render.velocity.VelocityRenderer
All Implemented Interfaces:
InfobitRenderer

public class VelocityRenderer
extends java.lang.Object
implements InfobitRenderer

takes care of infobit rendering. knows how to do it, which version to take and whatever. also produces fake templates for images / whatever.

Version:
$Revision: 1.6 $
Author:
konstantin

Constructor Summary
VelocityRenderer()
          Constructor for the VelocityRenderer object
 
Method Summary
 InfobitManager getManager()
          Gets the Manager attribute of the VelocityRenderer object
 void init(java.util.Properties properties)
          initialize itself and velocity with given properties.
 void render(java.lang.String name, java.io.Writer writer, java.util.Map parameters)
          entry point for infobit rendering
 void setManager(InfobitManager manager)
          Sets the Manager attribute of the VelocityRenderer object
 void setupContext(org.apache.velocity.context.Context context, java.lang.String infobitName)
          setup context for infobit rendering.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VelocityRenderer

public VelocityRenderer()
Constructor for the VelocityRenderer object

Method Detail

getManager

public InfobitManager getManager()
Gets the Manager attribute of the VelocityRenderer object

Specified by:
getManager in interface InfobitRenderer
Returns:
The Manager value

setupContext

public void setupContext(org.apache.velocity.context.Context context,
                         java.lang.String infobitName)
setup context for infobit rendering. this method is called by #inbfobit() directive it places following objects on context:

Parameters:
context - velocity context to be augmented
infobitName - Description of Parameter

setManager

public void setManager(InfobitManager manager)
Sets the Manager attribute of the VelocityRenderer object

Specified by:
setManager in interface InfobitRenderer
Parameters:
manager - The new Manager value

render

public void render(java.lang.String name,
                   java.io.Writer writer,
                   java.util.Map parameters)
            throws java.lang.Exception
entry point for infobit rendering

Specified by:
render in interface InfobitRenderer
Parameters:
writer - sink for rendered infobit data
name - name of infobit in question
parameters - parameter map - wil lbe used to rig up velocity context.
Throws:
java.lang.Exception - could be thrown if something wrong happens.

init

public void init(java.util.Properties properties)
initialize itself and velocity with given properties.

Specified by:
init in interface InfobitRenderer
Parameters:
properties - Description of Parameter


Copyright © 2003 Information Desire GmbH. All Rights Reserved.