public class DefaultGroovyPageLocator extends java.lang.Object implements GroovyPageLocator, org.springframework.web.context.ServletContextAware, org.springframework.context.ApplicationContextAware, org.codehaus.groovy.grails.plugins.PluginManagerAware
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultGroovyPageLocator.PluginViewPathInfo |
| Modifier and Type | Field and Description |
|---|---|
protected org.codehaus.groovy.grails.plugins.GrailsPluginManager |
pluginManager |
protected boolean |
reloadEnabled |
protected java.util.Collection<org.springframework.core.io.ResourceLoader> |
resourceLoaders |
protected boolean |
warDeployed |
| Constructor and Description |
|---|
DefaultGroovyPageLocator() |
| Modifier and Type | Method and Description |
|---|---|
void |
addResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
Adds a new resource loader to search
|
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)
Finds a page for the given URI
|
GroovyPageScriptSource |
findPageInBinding(java.lang.String uri,
GroovyPageBinding binding)
Finds a page for the URI and binding
|
GroovyPageScriptSource |
findPageInBinding(java.lang.String pluginName,
java.lang.String uri,
GroovyPageBinding binding)
Finds a page for the given URI
|
protected org.springframework.core.io.Resource |
findReloadablePage(java.lang.String uri) |
protected org.springframework.core.io.Resource |
findResource(java.util.List<java.lang.String> searchPaths) |
protected org.springframework.core.io.Resource |
findResource(java.lang.String uri) |
protected org.springframework.core.io.Resource |
findResourceInPlugins(java.lang.String uri) |
protected GroovyPageScriptSource |
findResourceScriptPathForSearchPaths(java.lang.String uri,
java.util.List<java.lang.String> 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)
Removes any precompiled pages for the given URI so that they can be replaced by dynamic pages
|
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,
org.codehaus.groovy.grails.plugins.GrailsPlugin plugin) |
protected java.util.List<java.lang.String> |
resolveSearchPaths(java.lang.String uri) |
protected GroovyPageScriptSource |
resolveViewInBinaryPlugin(org.codehaus.groovy.grails.plugins.BinaryGrailsPlugin binaryPlugin,
java.lang.String uri) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setPluginManager(org.codehaus.groovy.grails.plugins.GrailsPluginManager pluginManager) |
void |
setPrecompiledGspMap(java.util.Map<java.lang.String,java.lang.String> precompiledGspMap) |
void |
setReloadEnabled(boolean reloadEnabled) |
void |
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) |
void |
setServletContext(javax.servlet.ServletContext servletContext) |
protected java.util.Collection<org.springframework.core.io.ResourceLoader> resourceLoaders
protected org.codehaus.groovy.grails.plugins.GrailsPluginManager pluginManager
protected boolean warDeployed
protected boolean reloadEnabled
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
public void addResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
GroovyPageLocatoraddResourceLoader in interface GroovyPageLocatorresourceLoader - The resource loader to searchpublic void setPrecompiledGspMap(java.util.Map<java.lang.String,java.lang.String> precompiledGspMap)
public GroovyPageScriptSource findPage(java.lang.String uri)
GroovyPageLocatorfindPage in interface GroovyPageLocatoruri - The URIprotected org.springframework.core.io.Resource findReloadablePage(java.lang.String uri)
public GroovyPageScriptSource findPageInBinding(java.lang.String pluginName, java.lang.String uri, GroovyPageBinding binding)
GroovyPageLocatorfindPageInBinding in interface GroovyPageLocatoruri - The URIprotected java.lang.String resolveContextPath(java.lang.String pluginName,
java.lang.String uri,
GroovyPageBinding binding)
public void removePrecompiledPage(GroovyPageCompiledScriptSource scriptSource)
GroovyPageLocatorremovePrecompiledPage in interface GroovyPageLocatorscriptSource - The compiled script sourcepublic GroovyPageScriptSource findPageInBinding(java.lang.String uri, GroovyPageBinding binding)
GroovyPageLocatorfindPageInBinding in interface GroovyPageLocatoruri - The URIbinding - The bindingprotected GroovyPageScriptSource resolveViewInBinaryPlugin(org.codehaus.groovy.grails.plugins.BinaryGrailsPlugin binaryPlugin, java.lang.String uri)
protected GroovyPageCompiledScriptSource createGroovyPageCompiledScriptSource(java.lang.String uri, java.lang.String fullPath, java.lang.Class<?> viewClass)
protected GroovyPageScriptSource findBinaryScriptSource(java.lang.String uri)
protected GroovyPageScriptSource findResourceScriptSourceInPlugins(java.lang.String uri)
protected org.springframework.core.io.Resource findResourceInPlugins(java.lang.String uri)
protected java.lang.String resolvePluginViewPath(java.lang.String uri,
org.codehaus.groovy.grails.plugins.GrailsPlugin plugin)
protected java.lang.String removeViewLocationPrefixes(java.lang.String uri)
protected java.lang.String removePrefix(java.lang.String uri,
java.lang.String prefix)
protected GroovyPageScriptSource findResourceScriptSource(java.lang.String uri)
protected java.util.List<java.lang.String> resolveSearchPaths(java.lang.String uri)
protected GroovyPageScriptSource findResourceScriptPathForSearchPaths(java.lang.String uri, java.util.List<java.lang.String> searchPaths)
protected org.springframework.core.io.Resource findResource(java.lang.String uri)
protected org.springframework.core.io.Resource findResource(java.util.List<java.lang.String> searchPaths)
public void setServletContext(javax.servlet.ServletContext servletContext)
setServletContext in interface org.springframework.web.context.ServletContextAwarepublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void setPluginManager(org.codehaus.groovy.grails.plugins.GrailsPluginManager pluginManager)
setPluginManager in interface org.codehaus.groovy.grails.plugins.PluginManagerAwarepublic static DefaultGroovyPageLocator.PluginViewPathInfo getPluginViewPathInfo(java.lang.String uri)
public boolean isReloadEnabled()
public void setReloadEnabled(boolean reloadEnabled)