org.sakaiproject.metaobj.utils.mvc.impl
Class LocalVelocityConfigurer

java.lang.Object
  extended byorg.sakaiproject.metaobj.utils.mvc.impl.LocalVelocityConfigurer
All Implemented Interfaces:
ApplicationContextAware, InitializingBean, VelocityEngineFactory

public class LocalVelocityConfigurer
extends Object
implements InitializingBean, ApplicationContextAware, VelocityEngineFactory

Created by IntelliJ IDEA. User: John Ellis Date: Jul 5, 2005 Time: 4:21:23 PM To change this template use File | Settings | File Templates.


Field Summary
protected  org.apache.commons.logging.Log logger
           
 
Constructor Summary
LocalVelocityConfigurer()
           
 
Method Summary
 void afterPropertiesSet()
          Initialize VelocityEngineFactory's VelocityEngine if not overridden by a preconfigured VelocityEngine.
 org.apache.velocity.app.VelocityEngine createVelocityEngine()
          Prepare the VelocityEngine instance and return it.
 String getRealPath(String path)
           
 String getResourceLoaderPath()
           
 org.apache.velocity.app.VelocityEngine getVelocityEngine()
           
 Map getVelocityProperties()
           
protected  void initResourceLoader(org.apache.velocity.app.VelocityEngine velocityEngine)
          Initialize a SpringResourceLoader for the given VelocityEngine.
 boolean isPreferFileSystemAccess()
           
 void setApplicationContext(ApplicationContext applicationContext)
           
 void setPreferFileSystemAccess(boolean preferFileSystemAccess)
           
 void setResourceLoaderPath(String resourceLoaderPath)
           
 void setVelocityProperties(Map velocityProperties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final transient org.apache.commons.logging.Log logger
Constructor Detail

LocalVelocityConfigurer

public LocalVelocityConfigurer()
Method Detail

createVelocityEngine

public org.apache.velocity.app.VelocityEngine createVelocityEngine()
                                                            throws IOException,
                                                                   org.apache.velocity.exception.VelocityException
Prepare the VelocityEngine instance and return it.

Returns:
the VelocityEngine instance
Throws:
IOException - if the config file wasn't found
org.apache.velocity.exception.VelocityException - on Velocity initialization failure

getRealPath

public String getRealPath(String path)

initResourceLoader

protected void initResourceLoader(org.apache.velocity.app.VelocityEngine velocityEngine)
Initialize a SpringResourceLoader for the given VelocityEngine.

Parameters:
velocityEngine - the VelocityEngine to configure
See Also:
SpringResourceLoader

afterPropertiesSet

public void afterPropertiesSet()
                        throws IOException,
                               org.apache.velocity.exception.VelocityException
Initialize VelocityEngineFactory's VelocityEngine if not overridden by a preconfigured VelocityEngine.

Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
IOException
org.apache.velocity.exception.VelocityException
See Also:
createVelocityEngine()

getVelocityEngine

public org.apache.velocity.app.VelocityEngine getVelocityEngine()
Specified by:
getVelocityEngine in interface VelocityEngineFactory

getResourceLoaderPath

public String getResourceLoaderPath()

setResourceLoaderPath

public void setResourceLoaderPath(String resourceLoaderPath)

isPreferFileSystemAccess

public boolean isPreferFileSystemAccess()

setPreferFileSystemAccess

public void setPreferFileSystemAccess(boolean preferFileSystemAccess)

getVelocityProperties

public Map getVelocityProperties()

setVelocityProperties

public void setVelocityProperties(Map velocityProperties)

setApplicationContext

public void setApplicationContext(ApplicationContext applicationContext)
                           throws BeansException
Specified by:
setApplicationContext in interface ApplicationContextAware
Throws:
BeansException