|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--xdoclet.util.velocity.VelocityConfigurer
Utility class that supports dynamic configuration of Velocity's ResourceLoaders. This is necessary because templates will be read from jar files (plugin jars) and possibly also directories, and these are discovered at runtime by looking at the classpath.
Constructor Summary | |
VelocityConfigurer(ClasspathManager classpathManager)
Constructs a new VelocityConfigurer. |
Method Summary | |
void |
addLoader(Class resourceLoaderClass,
Collection files)
Adds a Velocity ResourceLoader. |
Properties |
getProperties()
Gets the additional Velocity properties. |
static Map |
getResourceLoaderMap()
Returns a Map that should have java.lang.Class objects as keys and a 2-dimensional String[] as value. |
VelocityEngine |
initVelocity()
Configures a VelocityEngine and returns it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public VelocityConfigurer(ClasspathManager classpathManager)
classpathManager
- holds the classpathMethod Detail |
public static Map getResourceLoaderMap()
public void addLoader(Class resourceLoaderClass, Collection files)
resourceLoaderClass
- resource loader classfiles
- Files to put on resource loader's pathpublic VelocityEngine initVelocity() throws Exception
If you need to configure the VelocityEngine beyond the standard configuration, call
addLoader(java.lang.Class, java.util.Collection)
to add additional loaders.
It's also possible to set additional Velocity properties in the Properties object returned
by getProperties()
.
Exception
public Properties getProperties()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |