Groovy Documentation

org.codehaus.groovy.grails.web.pages.discovery
[Java] Class DefaultGroovyPageLocator

java.lang.Object
  org.codehaus.groovy.grails.web.pages.discovery.DefaultGroovyPageLocator
All Implemented Interfaces:
GroovyPageLocator, org.springframework.web.context.ServletContextAware, org.springframework.context.ApplicationContextAware, PluginManagerAware

public class DefaultGroovyPageLocator
extends java.lang.Object

Used to locate GSPs whether in development or WAR deployed mode from static resources, custom resource loaders and binary plugins.

Authors:
Graeme Rocher
Since:
2.0


Nested Class Summary
static class DefaultGroovyPageLocator.PluginViewPathInfo

 
Field Summary
protected GrailsPluginManager pluginManager

protected boolean reloadEnabled

protected java.util.Collection resourceLoaders

protected boolean warDeployed

 
Method Summary
void addResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)

protected GroovyPageCompiledScriptSource createGroovyPageCompiledScriptSource(java.lang.String uri, java.lang.String fullPath, java.lang.Class viewClass)

protected GroovyPageScriptSource findBinaryScriptSource(java.lang.String uri)

GroovyPageScriptSource findPage(java.lang.String uri)

GroovyPageScriptSource findPageInBinding(java.lang.String pluginName, java.lang.String uri, GroovyPageBinding binding)

GroovyPageScriptSource findPageInBinding(java.lang.String uri, GroovyPageBinding binding)

protected org.springframework.core.io.Resource findReloadablePage(java.lang.String uri)

protected org.springframework.core.io.Resource findResource(java.lang.String uri)

protected org.springframework.core.io.Resource findResource(java.util.List searchPaths)

protected org.springframework.core.io.Resource findResourceInPlugins(java.lang.String uri)

protected GroovyPageScriptSource findResourceScriptPathForSearchPaths(java.lang.String uri, java.util.List searchPaths)

protected GroovyPageScriptSource findResourceScriptSource(java.lang.String uri)

protected GroovyPageScriptSource findResourceScriptSourceInPlugins(java.lang.String uri)

static DefaultGroovyPageLocator.PluginViewPathInfo getPluginViewPathInfo(java.lang.String uri)

boolean isReloadEnabled()

void removePrecompiledPage(GroovyPageCompiledScriptSource scriptSource)

protected java.lang.String removePrefix(java.lang.String uri, java.lang.String prefix)

protected java.lang.String removeViewLocationPrefixes(java.lang.String uri)

protected java.lang.String resolveContextPath(java.lang.String pluginName, java.lang.String uri, GroovyPageBinding binding)

protected java.lang.String resolvePluginViewPath(java.lang.String uri, GrailsPlugin plugin)

protected java.util.List resolveSearchPaths(java.lang.String uri)

protected GroovyPageScriptSource resolveViewInBinaryPlugin(BinaryGrailsPlugin binaryPlugin, java.lang.String uri)

void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)

void setPluginManager(GrailsPluginManager pluginManager)

void setPrecompiledGspMap(java.util.Map precompiledGspMap)

void setReloadEnabled(boolean reloadEnabled)

void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)

void setServletContext(javax.servlet.ServletContext servletContext)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Field Detail

pluginManager

protected GrailsPluginManager pluginManager


reloadEnabled

protected boolean reloadEnabled


resourceLoaders

protected java.util.Collection resourceLoaders


warDeployed

protected boolean warDeployed


 
Method Detail

addResourceLoader

public void addResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)


createGroovyPageCompiledScriptSource

protected GroovyPageCompiledScriptSource createGroovyPageCompiledScriptSource(java.lang.String uri, java.lang.String fullPath, java.lang.Class viewClass)


findBinaryScriptSource

protected GroovyPageScriptSource findBinaryScriptSource(java.lang.String uri)


findPage

public GroovyPageScriptSource findPage(java.lang.String uri)


findPageInBinding

public GroovyPageScriptSource findPageInBinding(java.lang.String pluginName, java.lang.String uri, GroovyPageBinding binding)


findPageInBinding

public GroovyPageScriptSource findPageInBinding(java.lang.String uri, GroovyPageBinding binding)


findReloadablePage

protected org.springframework.core.io.Resource findReloadablePage(java.lang.String uri)


findResource

protected org.springframework.core.io.Resource findResource(java.lang.String uri)


findResource

protected org.springframework.core.io.Resource findResource(java.util.List searchPaths)


findResourceInPlugins

protected org.springframework.core.io.Resource findResourceInPlugins(java.lang.String uri)


findResourceScriptPathForSearchPaths

@SuppressWarnings("unchecked")
protected GroovyPageScriptSource findResourceScriptPathForSearchPaths(java.lang.String uri, java.util.List searchPaths)


findResourceScriptSource

protected GroovyPageScriptSource findResourceScriptSource(java.lang.String uri)


findResourceScriptSourceInPlugins

protected GroovyPageScriptSource findResourceScriptSourceInPlugins(java.lang.String uri)


getPluginViewPathInfo

public static DefaultGroovyPageLocator.PluginViewPathInfo getPluginViewPathInfo(java.lang.String uri)


isReloadEnabled

public boolean isReloadEnabled()


removePrecompiledPage

public void removePrecompiledPage(GroovyPageCompiledScriptSource scriptSource)


removePrefix

protected java.lang.String removePrefix(java.lang.String uri, java.lang.String prefix)


removeViewLocationPrefixes

protected java.lang.String removeViewLocationPrefixes(java.lang.String uri)


resolveContextPath

protected java.lang.String resolveContextPath(java.lang.String pluginName, java.lang.String uri, GroovyPageBinding binding)


resolvePluginViewPath

protected java.lang.String resolvePluginViewPath(java.lang.String uri, GrailsPlugin plugin)


resolveSearchPaths

protected java.util.List resolveSearchPaths(java.lang.String uri)


resolveViewInBinaryPlugin

protected GroovyPageScriptSource resolveViewInBinaryPlugin(BinaryGrailsPlugin binaryPlugin, java.lang.String uri)


setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)


setPluginManager

public void setPluginManager(GrailsPluginManager pluginManager)


setPrecompiledGspMap

public void setPrecompiledGspMap(java.util.Map precompiledGspMap)


setReloadEnabled

public void setReloadEnabled(boolean reloadEnabled)


setResourceLoader

public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)


setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)


 

Groovy Documentation