com.acsinet_solutions.cetia4.service.impl
Class TemplateTextFactory

java.lang.Object
  extended by com.acsinet_solutions.cetia4.service.impl.TemplateTextFactory
All Implemented Interfaces:
TextFactory

public class TemplateTextFactory
extends java.lang.Object
implements TextFactory

Implementation of a text factory that uses a velocity template for it's internal generation.

Derechos Reservados

Author:
Santiago Arriaga

Constructor Summary
TemplateTextFactory()
           
 
Method Summary
 TransferableText getText(java.lang.String key, java.util.Map<java.lang.String,java.lang.Object> params)
          Get a text instance customized upon the given param values
 void setTemplates(java.util.Map map)
          Set the velocity templates for the text factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateTextFactory

public TemplateTextFactory()
Method Detail

setTemplates

public final void setTemplates(java.util.Map map)
Set the velocity templates for the text factory.


getText

public TransferableText getText(java.lang.String key,
                                java.util.Map<java.lang.String,java.lang.Object> params)
                         throws EvaluationException
Description copied from interface: TextFactory
Get a text instance customized upon the given param values

Specified by:
getText in interface TextFactory
Parameters:
key - The not-null key value
params - A not-null Map instance
Returns:
A not-null TransferableText instance
Throws:
EvaluationException
See Also:
TextFactory.getText(String, Map)