org.apache.tiles.request.velocity.autotag

## Class VelocityAutotagRuntime

- java.lang.Object
- - org.apache.velocity.runtime.directive.Directive
  - - org.apache.tiles.request.velocity.autotag.VelocityAutotagRuntime

- All Implemented Interfaces:
    Cloneable, AutotagRuntime<Request>, org.apache.velocity.runtime.directive.DirectiveConstants

      public class VelocityAutotagRuntime
      extends org.apache.velocity.runtime.directive.Directive
      implements AutotagRuntime<Request>

  A Runtime for implementing Velocity Directives.

- - ### Field Summary

    - ### Fields inherited from class org.apache.velocity.runtime.directive.Directive

      `log, rsvc`

    - ### Fields inherited from interface org.apache.velocity.runtime.directive.DirectiveConstants

      `BLOCK, LINE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `VelocityAutotagRuntime()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ModelBody` | `createModelBody()` Creates a new ModelBody instance to match the request.
    `Request` | `createRequest()` Creates a new Request instance.
    `String` | `getName()`
    `<T> T` | `getParameter(String name, Class<T> type, T defaultValue)` Extracts a parameter from the tag.
    `int` | `getType()`
    `boolean` | `render(org.apache.velocity.context.InternalContextAdapter context, Writer writer, org.apache.velocity.runtime.parser.node.Node node)`

    - ### Methods inherited from class org.apache.velocity.runtime.directive.Directive

      `checkArgs, getColumn, getLine, getScopeName, getTemplate, getTemplateName, init, isScopeProvided, makeScope, postRender, preRender, setLocation, setLocation`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### VelocityAutotagRuntime

          public VelocityAutotagRuntime()

  - ### Method Detail

    - #### createRequest

          public Request createRequest()

      Description copied from interface: `AutotagRuntime`
      Creates a new Request instance.
      Specified by:
        `createRequest` in interface `AutotagRuntime<Request>`
      Returns:
        The Request.

    - #### createModelBody

          public ModelBody createModelBody()

      Creates a new ModelBody instance to match the request.
      Specified by:
        `createModelBody` in interface `AutotagRuntime<Request>`
      Returns:
        The ModelBody.

    - #### getParameter

          public <T> T getParameter(String name,
                                    Class<T> type,
                                    T defaultValue)

      Extracts a parameter from the tag.
      Specified by:
        `getParameter` in interface `AutotagRuntime<Request>`
      Parameters:
        `name` - The name of the parameter.
        `defaultValue` - The default value if none is specified.
      Returns:
        The value of the parameter.

    - #### getName

          public String getName()

      Specified by:
        `getName` in class `org.apache.velocity.runtime.directive.Directive`

    - #### getType

          public int getType()

      Specified by:
        `getType` in class `org.apache.velocity.runtime.directive.Directive`

    - #### render

          public boolean render(org.apache.velocity.context.InternalContextAdapter context,
                                Writer writer,
                                org.apache.velocity.runtime.parser.node.Node node)

      Specified by:
        `render` in class `org.apache.velocity.runtime.directive.Directive`

Copyright © 2000–2024 Apache Software Foundation. All rights reserved.