|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GrailsControllerClass
Represents a controller class in Grails.
Field Summary | |
---|---|
static String |
ACTION
The general name to use when referring to action artefacts |
static String |
AFTER_INTERCEPTOR
The name of the after interceptor property |
static String |
BEFORE_INTERCEPTOR
The name of the before interceptor property |
static String |
CONTROLLER
The general name to use when referring to controller artefacts |
static String |
INDEX_ACTION
The name of the index action |
static String |
VIEW
The general name to use when referring to action view |
Method Summary | |
---|---|
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 |
String |
getClosurePropertyName(String uri)
Returns a closure property name for a specific URI or null if the URI does not map to a closure. |
Set |
getCommandObjectActions()
|
Set |
getCommandObjectClasses()
|
Map |
getFlows()
Returns a map of the flows for this controller. |
Class |
getScaffoldedClass()
|
String[] |
getURIs()
Gets the list of all possible URI's available in this controller. |
String |
getViewByName(String closureName)
Retrieves the view name for the specified closure name |
String |
getViewByURI(String uri)
Retrieves the view name for the specified URI |
boolean |
isFlowAction(String actionName)
Returns true if the given action name is a flow action |
boolean |
isHttpMethodAllowedForAction(groovy.lang.GroovyObject controller,
String httpMethod,
String actionName)
Checks to see if an action is accessible via a particular http method |
boolean |
isInterceptedAfter(groovy.lang.GroovyObject controller,
String action)
Checks whether the specified action is intercepted after for the specified controller instance |
boolean |
isInterceptedBefore(groovy.lang.GroovyObject controller,
String action)
Checks whether the specified action is intercepted for the specified controller instance |
boolean |
isScaffolding()
|
boolean |
mapsToURI(String uri)
Tests if a controller maps to a given URI. |
Methods inherited from interface org.codehaus.groovy.grails.commons.InjectableGrailsClass |
---|
byName, byType, getAvailable |
Methods inherited from interface org.codehaus.groovy.grails.commons.GrailsClass |
---|
getClazz, getFullName, getLogicalPropertyName, getMetaClass, getName, getNaturalName, getPackageName, getPropertyName, getPropertyValue, getPropertyValue, getReference, getShortName, hasProperty, newInstance |
Field Detail |
---|
static final String INDEX_ACTION
static final String BEFORE_INTERCEPTOR
static final String AFTER_INTERCEPTOR
static final String CONTROLLER
static final String ACTION
static final String VIEW
Method Detail |
---|
boolean isHttpMethodAllowedForAction(groovy.lang.GroovyObject controller, String httpMethod, String actionName)
controller
- The instance of the controllerhttpMethod
- The http request methodactionName
- The action to check
boolean isInterceptedBefore(groovy.lang.GroovyObject controller, String action)
controller
- The instance of the controlleraction
- The action to check
boolean isInterceptedAfter(groovy.lang.GroovyObject controller, String action)
controller
- The controller instanceaction
- The action to check
groovy.lang.Closure getBeforeInterceptor(groovy.lang.GroovyObject controller)
controller
- The controller instance
groovy.lang.Closure getAfterInterceptor(groovy.lang.GroovyObject controller)
controller
- The controller instance
String[] getURIs()
Gets the list of all possible URI's available in this controller.
boolean mapsToURI(String uri)
Tests if a controller maps to a given URI.
String getViewByURI(String uri)
uri
- the name of URI
String getViewByName(String closureName)
closureName
- The name of the closure
String getClosurePropertyName(String uri)
Returns a closure property name for a specific URI or null if the URI does not map to a closure.
uri
- the URI of the request
boolean isScaffolding()
Class getScaffoldedClass()
Set getCommandObjectActions()
Set getCommandObjectClasses()
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(String actionName)
actionName
- The name of the action
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |