com.acciente.induction.init.config
Class Config.Templating.TemplatePath

java.lang.Object
  extended by com.acciente.induction.init.config.Config.Templating.TemplatePath
Enclosing class:
Config.Templating

public static class Config.Templating.TemplatePath
extends Object

Modular configuration container


Nested Class Summary
static class Config.Templating.TemplatePath.Dir
          Modular configuration container
static class Config.Templating.TemplatePath.LoaderClass
          Modular configuration container
static class Config.Templating.TemplatePath.WebappPath
          Modular configuration container
 
Constructor Summary
Config.Templating.TemplatePath()
           
 
Method Summary
 void addDir(File oDir)
          Adds a directory to the list of locations in which a template will be searched
 void addLoaderClass(String sLoaderClassName, String sPath)
          Adds a class to the list of locations in which a template will be searched, this setting will only be used by a templating engine that supports it (e.g: Freemarker) in these cases the templating engine will call the getResource() method on the specified class to retrieve a template
 void addWebappPath(String sRelativePath)
          Adds a web application path to the list of locations in which a template will be searched, this setting will only be used by a templating engine that supports it (e.g: Freemarker) in these cases the templating engine will call the Servlet context's getResource() method to passing the name to getResource()
 List getList()
          Returns the list of items added to this path
 String toString()
           
 String toXML()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Config.Templating.TemplatePath

public Config.Templating.TemplatePath()
Method Detail

addDir

public void addDir(File oDir)
Adds a directory to the list of locations in which a template will be searched

Parameters:
oDir - a File object representing a directory

addLoaderClass

public void addLoaderClass(String sLoaderClassName,
                           String sPath)
Adds a class to the list of locations in which a template will be searched, this setting will only be used by a templating engine that supports it (e.g: Freemarker) in these cases the templating engine will call the getResource() method on the specified class to retrieve a template

Parameters:
sLoaderClassName - a prefix to append to the template name before attempting
sPath - a path to where the templates are located, if the path starts with a / then the path is absolute, otherwise it is assumed to be relative to the package name of the loader class

addWebappPath

public void addWebappPath(String sRelativePath)
Adds a web application path to the list of locations in which a template will be searched, this setting will only be used by a templating engine that supports it (e.g: Freemarker) in these cases the templating engine will call the Servlet context's getResource() method to passing the name to getResource()

Parameters:
sRelativePath - a path of the web application root (the parent of the WEB-INF folder)

getList

public List getList()
Returns the list of items added to this path

Returns:
a list, each element in the list is one of the following types: Dir, Class or WebappPath

toString

public String toString()
Overrides:
toString in class Object

toXML

public String toXML()


Copyright © 2008-2013 Acciente, LLC. All Rights Reserved.