ControllerArtefactHandler (Grails 2.4.4)
Date: 2014-10-28

Package: org.codehaus.groovy.grails.commons

## [Java] Class ControllerArtefactHandler

- org.codehaus.groovy.grails.commons.ControllerArtefactHandler

- All Implemented Interfaces and Traits:
    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

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `static class` | `ControllerArtefactHandler.ControllerCacheKey` |

  - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static java.lang.String` | `PLUGIN_NAME` |
    `static java.lang.String` | `TYPE` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class ArtefactHandlerAdapter` | `log`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `ControllerArtefactHandler ()`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `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)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class ArtefactHandlerAdapter` | `getArtefactForFeature, getPluginName, getType, initialize, isArtefact, isArtefactClass, isArtefactGrailsClass, newArtefactClass`
    `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

    - #### public static final java.lang.String PLUGIN_NAME

    - #### public static final java.lang.String TYPE

  - ### Constructor Detail

    - #### public ControllerArtefactHandler()

  - ### Method Detail

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

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

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

    - #### 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

    - #### 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

    - #### public void setGrailsApplication(GrailsApplication grailsApplication)