org.apache.maven.plugin.checkstyle.rss
Class VelocityTemplate

java.lang.Object
  extended by org.apache.maven.plugin.checkstyle.rss.VelocityTemplate

public class VelocityTemplate
extends Object

A component to work with VelocityTemplates from within plugins.

You will need to reference the velocity component as a parameter in your plugin. Like this:

 /**
  * Velocity Component
  * @component
  */
  private VelocityComponent velocity;
 

Version:
$Id: VelocityTemplate.html 938569 2015-02-01 15:55:48Z dennisl $
Author:
Joakim Erdfelt

Constructor Summary
VelocityTemplate(VelocityComponent velocityComponent, String templateBaseDirectory)
           
 
Method Summary
 void generate(String outputFilename, String template, Context context)
          Using a specified Velocity Template and provided context, create the outputFilename.
 Log getLog()
           
 String getTemplateDirectory()
           
 VelocityComponent getVelocity()
           
 void setLog(Log log)
           
 void setTemplateDirectory(String templateDirectory)
           
 void setVelocity(VelocityComponent velocity)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VelocityTemplate

public VelocityTemplate(VelocityComponent velocityComponent,
                        String templateBaseDirectory)
Method Detail

getTemplateDirectory

public String getTemplateDirectory()

getVelocity

public VelocityComponent getVelocity()

generate

public void generate(String outputFilename,
                     String template,
                     Context context)
              throws VelocityException,
                     MojoExecutionException,
                     IOException
Using a specified Velocity Template and provided context, create the outputFilename.

Parameters:
outputFilename - the file to be generated.
template - the velocity template to use.
context - the velocity context map.
Throws:
VelocityException - if the template was not found or any other Velocity exception.
MojoExecutionException
IOException

setTemplateDirectory

public void setTemplateDirectory(String templateDirectory)

setVelocity

public void setVelocity(VelocityComponent velocity)

getLog

public Log getLog()

setLog

public void setLog(Log log)


Copyright © 2005–2015 The Apache Software Foundation. All rights reserved.