public interface GrailsControllerClass extends InjectableGrailsClass
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ACTION
The general name to use when referring to action artefacts.
|
static java.lang.String |
AFTER_INTERCEPTOR
The name of the after interceptor property.
|
static java.lang.String |
BEFORE_INTERCEPTOR
The name of the before interceptor property.
|
static java.lang.String |
CONTROLLER
The general name to use when referring to controller artefacts.
|
static java.lang.String |
INDEX_ACTION
The name of the index action.
|
static java.lang.String |
NAMESPACE_PROPERTY
The name of the namespace property
|
static java.lang.String |
VIEW
The general name to use when referring to action view.
|
| Modifier and Type | Method and Description |
|---|---|
groovy.lang.Closure |
getAfterInterceptor(groovy.lang.GroovyObject controller)
Retrieves the after interceptor for the specified controller instance.
|
groovy.lang.Closure |
getBeforeInterceptor(groovy.lang.GroovyObject controller)
Retrieves the before interceptor for the specified controller instance.
|
java.util.Set |
getCommandObjectActions()
Deprecated.
This method is deprecated and will be removed in a future version of Grails
|
java.util.Set |
getCommandObjectClasses()
Deprecated.
This method is deprecated and will be removed in a future version of Grails
|
java.lang.String |
getDefaultAction()
Returns the default action for this Controller.
|
java.util.Map |
getFlows()
Returns a map of the flows for this controller.
|
java.lang.String |
getMethodActionName(java.lang.String uri)
Returns a closure property name for a specific URI or null if the URI does not map to a closure.
|
java.lang.String |
getNamespace() |
java.lang.String[] |
getURIs()
Gets the list of all possible URI's available in this controller.
|
java.lang.String |
getViewByName(java.lang.String closureName)
Retrieves the view name for the specified closure name.
|
java.lang.String |
getViewByURI(java.lang.String uri)
Retrieves the view name for the specified URI.
|
void |
initialize()
Initialize the controller class
|
boolean |
isFlowAction(java.lang.String actionName)
Returns true if the given action name is a flow action.
|
boolean |
isHttpMethodAllowedForAction(groovy.lang.GroovyObject controller,
java.lang.String httpMethod,
java.lang.String actionName)
Checks to see if an action is accessible via a particular http method.
|
boolean |
isInterceptedAfter(groovy.lang.GroovyObject controller,
java.lang.String action)
Checks whether the specified action is intercepted after for the specified
controller instance.
|
boolean |
isInterceptedBefore(groovy.lang.GroovyObject controller,
java.lang.String action)
Checks whether the specified action is intercepted for the
specified controller instance.
|
boolean |
mapsToURI(java.lang.String uri)
Tests if a controller maps to a given URI.
|
void |
registerMapping(java.lang.String actionName)
Registers a new mapping onto this controller for the given actionName.
|
void |
setDefaultActionName(java.lang.String defaultActionName)
Sets the name of the default action.
|
byName, byType, getAvailablegetClazz, getFullName, getGrailsApplication, getLogicalPropertyName, getMetaClass, getName, getNaturalName, getPackageName, getPropertyName, getPropertyValue, getPropertyValue, getReference, getReferenceInstance, getShortName, hasProperty, isAbstract, newInstancesetGrailsApplicationstatic final java.lang.String INDEX_ACTION
static final java.lang.String BEFORE_INTERCEPTOR
static final java.lang.String AFTER_INTERCEPTOR
static final java.lang.String CONTROLLER
static final java.lang.String ACTION
static final java.lang.String VIEW
static final java.lang.String NAMESPACE_PROPERTY
boolean isHttpMethodAllowedForAction(groovy.lang.GroovyObject controller,
java.lang.String httpMethod,
java.lang.String actionName)
controller - The instance of the controllerhttpMethod - The http request methodactionName - The action to checkboolean isInterceptedBefore(groovy.lang.GroovyObject controller,
java.lang.String action)
controller - The instance of the controlleraction - The action to checkboolean isInterceptedAfter(groovy.lang.GroovyObject controller,
java.lang.String action)
controller - The controller instanceaction - The action to checkgroovy.lang.Closure getBeforeInterceptor(groovy.lang.GroovyObject controller)
controller - The controller instancegroovy.lang.Closure getAfterInterceptor(groovy.lang.GroovyObject controller)
controller - The controller instancejava.lang.String[] getURIs()
boolean mapsToURI(java.lang.String uri)
java.lang.String getViewByURI(java.lang.String uri)
uri - the name of URIjava.lang.String getViewByName(java.lang.String closureName)
closureName - The name of the closurejava.lang.String getNamespace()
java.lang.String getMethodActionName(java.lang.String uri)
uri - the URI of the request@Deprecated java.util.Set getCommandObjectActions()
@Deprecated java.util.Set getCommandObjectClasses()
java.util.Map getFlows()
Returns a map of the flows for this controller. A flow is an action that ends with the convention "Flow". The keys in the map are the flow ids which are the text before the "Flow" suffix. For example a flow called "bookFlow" would have a key of "book"
The values within the Map are Groovy closures (@see groovy.lang.Closure) which represent the flow definition
boolean isFlowAction(java.lang.String actionName)
actionName - The name of the actionjava.lang.String getDefaultAction()
void registerMapping(java.lang.String actionName)
actionName - The actionNamevoid setDefaultActionName(java.lang.String defaultActionName)
defaultActionName - The default action namevoid initialize()