magoffin.matt.ma2.web.util
Class ThemeAwareResourceLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by magoffin.matt.ma2.web.util.ThemeAwareResourceLoader
All Implemented Interfaces:
org.springframework.web.context.ServletContextAware

public class ThemeAwareResourceLoader
extends java.lang.ClassLoader
implements org.springframework.web.context.ServletContextAware

ClassLoader implementation that is able to load theme resources.

This class loader allows themes to have their own message resources.

Version:
$Revision: 43 $ $Date: 2007-10-21 11:10:01 +1300 (Sun, 21 Oct 2007) $
Author:
Matt Magoffin (spamsqr@msqr.us)

Constructor Summary
ThemeAwareResourceLoader()
          Constrcutor.
 
Method Summary
protected  java.net.URL findResource(java.lang.String name)
           
 java.lang.String getBaseThemePath()
           
 WebHelper getWebHelper()
           
 void setBaseThemePath(java.lang.String baseThemePath)
           
 void setServletContext(javax.servlet.ServletContext servletContext)
           
 void setWebHelper(WebHelper webHelper)
           
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThemeAwareResourceLoader

public ThemeAwareResourceLoader()
Constrcutor.

Method Detail

setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)
Specified by:
setServletContext in interface org.springframework.web.context.ServletContextAware

findResource

protected java.net.URL findResource(java.lang.String name)
Overrides:
findResource in class java.lang.ClassLoader

getBaseThemePath

public java.lang.String getBaseThemePath()
Returns:
the baseThemePath

setBaseThemePath

public void setBaseThemePath(java.lang.String baseThemePath)
Parameters:
baseThemePath - the baseThemePath to set

getWebHelper

public WebHelper getWebHelper()
Returns:
the webHelper

setWebHelper

public void setWebHelper(WebHelper webHelper)
Parameters:
webHelper - the webHelper to set