org.apache.tiles.request.velocity.autotag

## Class VelocityUtil

- java.lang.Object
- - org.apache.tiles.request.velocity.autotag.VelocityUtil

-     public final class VelocityUtil
      extends Object

  Utilities for Velocity usage in Tiles.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Object` | `getObject(Object value, Object defaultValue)` Returns the "value" parameter if it is not null, otherwise returns "defaultValue".
    `static Map<String,Object>` | `getParameters(org.apache.velocity.context.InternalContextAdapter context, org.apache.velocity.runtime.parser.node.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(org.apache.velocity.context.InternalContextAdapter context,
                                                         org.apache.velocity.runtime.parser.node.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 © 2000–2023 Apache Software Foundation. All rights reserved.