org.apache.turbine.modules.navigations

## Class VelocityNavigation

- java.lang.Object
- - org.apache.turbine.modules.Assembler
  - - org.apache.turbine.modules.Navigation
    - - org.apache.turbine.modules.navigations.TemplateNavigation
      - - org.apache.turbine.modules.navigations.VelocityNavigation

- Direct Known Subclasses:
    LegacyVelocityNavigation

      public class VelocityNavigation
      extends TemplateNavigation

  VelocityNavigation. This screen relies on the VelocityPage being set as the default page. The doBuildTemplate() assumes the user has put the template filename in the RunData parameter and set it to the value of the template file to execute. Specialized Navigations screens should extend this class and override the doBuildTemplate( data , context) method.
  Version:
    $Id: VelocityNavigation.java 1773378 2016-12-09 13:19:59Z tv $
  Author:
    Dave Bryson, Henning P. Schmiedehausen, Peter Courcoux

- - ### Field Summary

    - ### Fields inherited from class org.apache.turbine.modules.Navigation

      `CACHE_SIZE_DEFAULT, CACHE_SIZE_KEY, NAME, PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `VelocityNavigation()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `buildTemplate(PipelineData pipelineData)` This builds the Velocity template.
    `protected void` | `doBuildTemplate(PipelineData pipelineData)` Needs to be implemented to make TemplateNavigation like us.
    `protected void` | `doBuildTemplate(PipelineData pipelineData, org.apache.velocity.context.Context context)` Velocity Navigations extending this class should override this method to perform any particular business logic and add information to the context.

    - ### Methods inherited from class org.apache.turbine.modules.navigations.TemplateNavigation

      `doBuild`

    - ### Methods inherited from class org.apache.turbine.modules.Navigation

      `build, getPrefix`

    - ### Methods inherited from class org.apache.turbine.modules.Assembler

      `getRunData`

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

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

- - ### Constructor Detail

    - #### VelocityNavigation

          public VelocityNavigation()

  - ### Method Detail

    - #### doBuildTemplate

          protected void doBuildTemplate(PipelineData pipelineData,
                             org.apache.velocity.context.Context context)
                                  throws Exception

      Velocity Navigations extending this class should override this method to perform any particular business logic and add information to the context.
      Parameters:
        `pipelineData` - Turbine information.
        `context` - Context for web pages.
      Throws:
        `Exception` - a generic exception.

    - #### doBuildTemplate

          protected void doBuildTemplate(PipelineData pipelineData)
                                  throws Exception

      Needs to be implemented to make TemplateNavigation like us. The actual method that you should override is the one with the context in the parameter list.
      Specified by:
        `doBuildTemplate` in class `TemplateNavigation`
      Parameters:
        `pipelineData` - Turbine information.
      Throws:
        `Exception` - a generic exception.

    - #### buildTemplate

          public String buildTemplate(PipelineData pipelineData)
                               throws Exception

      This builds the Velocity template.
      Specified by:
        `buildTemplate` in class `TemplateNavigation`
      Parameters:
        `pipelineData` - Turbine information.
      Returns:
        the content of the navigation module
      Throws:
        `Exception` - a generic exception.

Copyright © 2000–2018 The Apache Software Foundation. All rights reserved.