org.apache.tiles.request.velocity.autotag
Class VelocityUtil

Package class diagram package VelocityUtil
java.lang.Object
  extended by org.apache.tiles.request.velocity.autotag.VelocityUtil

public final class VelocityUtil
extends Object

Utilities for Velocity usage in Tiles.

Version:
$Rev: 1306435 $ $Date: 2012-03-28 11:39:11 -0400 (Wed, 28 Mar 2012) $

Method Summary
static Object getObject(Object value, Object defaultValue)
          Returns the "value" parameter if it is not null, otherwise returns "defaultValue".
static Map<String,Object> getParameters(InternalContextAdapter context, Node node)
          Extracts the parameters from the directives, by getting the child at position 0 supposing it is a map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getParameters

public static Map<String,Object> getParameters(InternalContextAdapter context,
                                               Node node)
Extracts the parameters from the directives, by getting the child at position 0 supposing it is a map.

Parameters:
context - The Velocity context.
node - The node to use.
Returns:
The extracted parameters.

getObject

public static Object getObject(Object value,
                               Object defaultValue)
Returns the "value" parameter if it is not null, otherwise returns "defaultValue".

Parameters:
value - The value to return, if it is not null.
defaultValue - The value to return, if value is null.
Returns:
The value, defaulted if necessary.


Copyright © 2001-2012 Apache Software Foundation. All Rights Reserved.