org.codehaus.groovy.grails.web.pages.discovery
Class GroovyPageStaticResourceLocator

java.lang.Object
  extended by org.codehaus.groovy.grails.core.io.DefaultResourceLocator
      extended by org.codehaus.groovy.grails.web.pages.discovery.GroovyPageStaticResourceLocator
All Implemented Interfaces:
org.codehaus.groovy.grails.core.io.ResourceLocator, org.codehaus.groovy.grails.plugins.PluginManagerAware, org.springframework.beans.factory.Aware, org.springframework.context.ResourceLoaderAware
Direct Known Subclasses:
CachingGroovyPageStaticResourceLocator

public class GroovyPageStaticResourceLocator
extends org.codehaus.groovy.grails.core.io.DefaultResourceLocator

Extends the DefaultResourceLocator class with extra methods to evaluate static resources relative to the currently executing GSP page.

This class is used to resolve references to static resources like CSS, Javascript and images files

Since:
2.0

Field Summary
 
Fields inherited from class org.codehaus.groovy.grails.core.io.DefaultResourceLocator
classNameToResourceCache, classSearchDirectories, CLOSURE_MARKER, defaultResourceLoader, FILE_SEPARATOR, NULL_RESOURCE, patchMatchingResolver, pluginManager, resourceSearchDirectories, uriToResourceCache, warDeployed, WEB_APP_DIR, WILDCARD
 
Constructor Summary
GroovyPageStaticResourceLocator()
           
 
Method Summary
 org.springframework.core.io.Resource findResourceForURI(java.lang.String uri)
           
 
Methods inherited from class org.codehaus.groovy.grails.core.io.DefaultResourceLocator
findResourceForClassName, findResourceInBinaryPlugins, getDefaultResourceLoader, setPluginManager, setResourceLoader, setSearchLocation, setSearchLocations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroovyPageStaticResourceLocator

public GroovyPageStaticResourceLocator()
Method Detail

findResourceForURI

public org.springframework.core.io.Resource findResourceForURI(java.lang.String uri)
Specified by:
findResourceForURI in interface org.codehaus.groovy.grails.core.io.ResourceLocator
Overrides:
findResourceForURI in class org.codehaus.groovy.grails.core.io.DefaultResourceLocator