Groovy Documentation

org.grails.plugin.vaadin.gsp
[Groovy] Class GspResourceLocator

java.lang.Object
  org.grails.plugin.vaadin.gsp.GspResourceLocator
All Implemented Interfaces:
org.springframework.web.context.ServletContextAware

class GspResourceLocator

For finding GSP files, which can be views, templates or resources.

Authors:
Francis McKenzie


Property Summary
static def GSP_FILE_EXTENSIONS

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

org.codehaus.groovy.grails.web.pages.discovery.GrailsConventionGroovyPageLocator groovyPageLocator

def log

ServletContext servletContext

 
Constructor Summary
GspResourceLocator()

 
Method Summary
Map findGsp(def uri)

Finds a GSP file, using grailsResourceLocator and groovyPageLocator.

protected Map findGspResource(def uri)

Finds a GSP resource file, using grailsResourceLocator.

protected Map findGspTemplate(def uri)

Finds a GSP template file, using groovyPageLocator.

protected Map findGspView(def uri)

Finds a GSP view file, using groovyPageLocator.

String generateCompiledFilenameFromOriginal(def filename)

Removes .gsp suffix from filename

boolean isGsp(def fileOrUri)

Checks for .gsp suffix in filename or uri

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Property Detail

GSP_FILE_EXTENSIONS

static def GSP_FILE_EXTENSIONS


grailsResourceLocator

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


groovyPageLocator

org.codehaus.groovy.grails.web.pages.discovery.GrailsConventionGroovyPageLocator groovyPageLocator


log

def log


servletContext

ServletContext servletContext


 
Constructor Detail

GspResourceLocator

GspResourceLocator()


 
Method Detail

findGsp

Map findGsp(def uri)
Finds a GSP file, using grailsResourceLocator and groovyPageLocator. Note that the GSP may be a view, a template or a resource. This method tries to find the GSP by searching those 3 types in that order. If a GSP is found, a map is returned with the following elements: uri: uri String of GSP file: java File of GSP type: either 'view', 'template' or 'resource' If no GSP found, an empty map is returned.
Parameters:
uri - The external URI of the GSP
Returns:
Map of results (empty if no GSP found)


findGspResource

protected Map findGspResource(def uri)
Finds a GSP resource file, using grailsResourceLocator.


findGspTemplate

protected Map findGspTemplate(def uri)
Finds a GSP template file, using groovyPageLocator.


findGspView

protected Map findGspView(def uri)
Finds a GSP view file, using groovyPageLocator.


generateCompiledFilenameFromOriginal

String generateCompiledFilenameFromOriginal(def filename)
Removes .gsp suffix from filename


isGsp

boolean isGsp(def fileOrUri)
Checks for .gsp suffix in filename or uri


 

Groovy Documentation