Represents a controller class in Grails.
Modifiers | Name | Description |
---|---|---|
java.lang.String |
ACTION |
The general name to use when referring to action artefacts. |
java.lang.String |
AFTER_INTERCEPTOR |
The name of the after interceptor property. |
java.lang.String |
BEFORE_INTERCEPTOR |
The name of the before interceptor property. |
java.lang.String |
CONTROLLER |
The general name to use when referring to controller artefacts. |
java.lang.String |
INDEX_ACTION |
The name of the index action. |
java.lang.String |
NAMESPACE_PROPERTY |
The name of the namespace property |
java.lang.String |
VIEW |
The general name to use when referring to action view. |
Type Params | Return Type | Name and description |
---|---|---|
|
java.lang.String |
actionUriToViewName(java.lang.String actionUri) |
|
java.util.Set<java.lang.String> |
getActions() @return The action names |
|
java.lang.String |
getDefaultAction() Returns the default action for this Controller. |
|
java.lang.String |
getNamespace() @return the namespace of this controller, null if none was specified |
|
java.lang.String |
getScope() @return The scope of the controller, defaults to singleton |
|
void |
initialize() Initialize the controller class |
|
java.lang.Object |
invoke(java.lang.Object controller, java.lang.String action) Invokes a controller action on the given controller instance |
|
boolean |
isSingleton() @return Whether the scope is singleton |
|
boolean |
mapsToURI(java.lang.String uri) Tests if a controller maps to a given URI. |
|
void |
registerUrlConverter(UrlConverter urlConverter) Register a new UrlConverter with the controller |
Methods inherited from class | Name |
---|---|
interface InjectableGrailsClass |
byName, byType, getAvailable |
interface GrailsClass |
getApplication, getClazz, getFullName, getLogicalPropertyName, getMetaClass, getName, getNaturalName, getPackageName, getPluginName, getPropertyName, getPropertyValue, getPropertyValue, getReferenceInstance, getShortName, hasProperty, isAbstract, newInstance |
interface GrailsApplicationAware |
setGrailsApplication |
The general name to use when referring to action artefacts.
The name of the after interceptor property.
The name of the before interceptor property.
The general name to use when referring to controller artefacts.
The name of the index action.
The name of the namespace property
The general name to use when referring to action view.
Returns the default action for this Controller.
Initialize the controller class
Invokes a controller action on the given controller instance
controller
- The controller instanceaction
- The action
Tests if a controller maps to a given URI.
Register a new UrlConverter with the controller
urlConverter
- The UrlConverter to register