org.restafarian.core.utils
Class SimpleVelocityService

java.lang.Object
  extended by org.restafarian.core.utils.SimpleVelocityService

public class SimpleVelocityService
extends java.lang.Object

This class is a simple wrapper for Velocity.


Method Summary
static java.lang.String evaluate(java.lang.String template, java.lang.Object sourceData)
          Uses Velocity to evaluate the template using the source data for the Velocity context.
static SimpleVelocityService getService()
          Returns the currently active service object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

evaluate

public static java.lang.String evaluate(java.lang.String template,
                                        java.lang.Object sourceData)

Uses Velocity to evaluate the template using the source data for the Velocity context.

Parameters:
template - the velocity template
sourceData - the source data used for the Velocity context
Returns:
the resolved template

getService

public static SimpleVelocityService getService()

Returns the currently active service object.

Returns:
the currently active service object


Copyright © 2008. All Rights Reserved.