org.codehaus.groovy.grails.support
Class DevelopmentResourceLoader

java.lang.Object
  extended by org.springframework.core.io.DefaultResourceLoader
      extended by org.codehaus.groovy.grails.support.DevelopmentResourceLoader
All Implemented Interfaces:
ResourceLoader

public class DevelopmentResourceLoader
extends DefaultResourceLoader

Allows files references like /WEB-INF/grails-app to be loaded from ./grails-app to support the difference between wAR deployment and run-app.

Since:
1.0
Author:
Graeme Rocher

Field Summary
 
Fields inherited from interface org.springframework.core.io.ResourceLoader
CLASSPATH_URL_PREFIX
 
Constructor Summary
DevelopmentResourceLoader()
           
DevelopmentResourceLoader(GrailsApplication application)
           
DevelopmentResourceLoader(GrailsApplication application, String baseLocation)
           
 
Method Summary
protected  String getRealLocationInProject(String location)
          Retrieves the real location of a GSP within a Grails project.
 Resource getResource(String location)
           
 
Methods inherited from class org.springframework.core.io.DefaultResourceLoader
getClassLoader, getResourceByPath, setClassLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DevelopmentResourceLoader

public DevelopmentResourceLoader(GrailsApplication application)

DevelopmentResourceLoader

public DevelopmentResourceLoader()

DevelopmentResourceLoader

public DevelopmentResourceLoader(GrailsApplication application,
                                 String baseLocation)
Method Detail

getResource

public Resource getResource(String location)
Specified by:
getResource in interface ResourceLoader
Overrides:
getResource in class DefaultResourceLoader

getRealLocationInProject

protected String getRealLocationInProject(String location)
Retrieves the real location of a GSP within a Grails project.

Parameters:
location - The location of the GSP at deployment time
Returns:
The location of the GSP at development time