org.codehaus.plexus.velocity
Class DefaultVelocityComponent

java.lang.Object
  extended byorg.codehaus.plexus.logging.AbstractLogEnabled
      extended byorg.codehaus.plexus.velocity.DefaultVelocityComponent
All Implemented Interfaces:
org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.codehaus.plexus.logging.LogEnabled, org.apache.velocity.runtime.log.LogSystem, VelocityComponent

public class DefaultVelocityComponent
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements VelocityComponent, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.apache.velocity.runtime.log.LogSystem

A simple velocity component implementation.

A typical configuration will look like this:

      
        
          
            runtime.log.logsystem.class
            org.codehaus.plexus.velocity.Log4JLoggingSystem
          
          
            runtime.log.logsystem.log4j.category
            org.codehaus.plexus.velocity.DefaultVelocityComponentTest
          
          
            resource.loader
            classpath
          
          
            classpath.resource.loader.class
            org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
          
        
      
 


Field Summary
 
Fields inherited from interface org.codehaus.plexus.velocity.VelocityComponent
ROLE
 
Fields inherited from interface org.apache.velocity.runtime.log.LogSystem
DEBUG_ID, DEBUG_ON, ERROR_ID, INFO_ID, WARN_ID
 
Constructor Summary
DefaultVelocityComponent()
           
 
Method Summary
 org.apache.velocity.app.VelocityEngine getEngine()
           
 void init(org.apache.velocity.runtime.RuntimeServices runtimeServices)
           
 void initialize()
           
 void logVelocityMessage(int level, java.lang.String message)
           
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultVelocityComponent

public DefaultVelocityComponent()
Method Detail

initialize

public void initialize()
                throws org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
Specified by:
initialize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
Throws:
org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException

getEngine

public org.apache.velocity.app.VelocityEngine getEngine()
Specified by:
getEngine in interface VelocityComponent

init

public void init(org.apache.velocity.runtime.RuntimeServices runtimeServices)
Specified by:
init in interface org.apache.velocity.runtime.log.LogSystem

logVelocityMessage

public void logVelocityMessage(int level,
                               java.lang.String message)
Specified by:
logVelocityMessage in interface org.apache.velocity.runtime.log.LogSystem


Copyright © 2001-2007 Codehaus. All Rights Reserved.