Groovy Documentation

org.codehaus.groovy.grails.commons
[Java] Class ControllerArtefactHandler

java.lang.Object
  org.codehaus.groovy.grails.commons.ArtefactHandlerAdapter
      org.codehaus.groovy.grails.commons.ControllerArtefactHandler
All Implemented Interfaces:
GrailsApplicationAware

public class ControllerArtefactHandler
extends ArtefactHandlerAdapter

Lookup controllers for uris.

This class is responsible for looking up controller classes for uris.

Lookups are cached in non-development mode, and the cache size can be controlled using the grails.urlmapping.cache.maxsize config property.

Authors:
Marc Palmer (marc@anyware.co.uk)


Nested Class Summary
static class ControllerArtefactHandler.ControllerCacheKey

 
Field Summary
static java.lang.String PLUGIN_NAME

static java.lang.String TYPE

 
Fields inherited from class ArtefactHandlerAdapter
log
 
Constructor Summary
ControllerArtefactHandler()

 
Method Summary
GrailsClass getArtefactForFeature(java.lang.Object featureId)

java.lang.String getPluginName()

void initialize(ArtefactInfo artefacts)

protected boolean namespaceMatches(GrailsControllerClass c, java.lang.String namespace)

@param c the class to inspect

protected boolean pluginMatches(GrailsClass c, java.lang.String pluginName, GrailsPluginManager grailsPluginManager)

@param c the class to inspect

void setGrailsApplication(GrailsApplication grailsApplication)

 
Methods inherited from class ArtefactHandlerAdapter
getArtefactForFeature, getPluginName, getType, initialize, isArtefact, isArtefactClass, isArtefactGrailsClass, newArtefactClass
 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), 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

PLUGIN_NAME

public static final java.lang.String PLUGIN_NAME


TYPE

public static final java.lang.String TYPE


 
Constructor Detail

ControllerArtefactHandler

public ControllerArtefactHandler()


 
Method Detail

getArtefactForFeature

@java.lang.SuppressWarnings("rawtypes")
@java.lang.Override
public GrailsClass getArtefactForFeature(java.lang.Object featureId)


getPluginName

@java.lang.Override
public java.lang.String getPluginName()


initialize

@java.lang.Override
public void initialize(ArtefactInfo artefacts)


namespaceMatches

protected boolean namespaceMatches(GrailsControllerClass c, java.lang.String namespace)
Parameters:
c - the class to inspect
namespace - a controller namespace
Returns:
true if c is in namespace


pluginMatches

protected boolean pluginMatches(GrailsClass c, java.lang.String pluginName, GrailsPluginManager grailsPluginManager)
Parameters:
c - the class to inspect
pluginName - the name of a plugin
grailsPluginManager - the plugin manager
Returns:
true if c is provided by a plugin with the name pluginName or if pluginName is null, otherwise false


setGrailsApplication

public void setGrailsApplication(GrailsApplication grailsApplication)


 

Groovy Documentation