|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.groovy.grails.commons.AbstractGrailsClass
org.codehaus.groovy.grails.commons.AbstractInjectableGrailsClass
org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass
public class DefaultGrailsControllerClass
A class that evaluates the conventions contained within controllers to perform auto-configuration
| Field Summary | |
|---|---|
static String |
CONTROLLER
|
| Fields inherited from interface org.codehaus.groovy.grails.commons.GrailsControllerClass |
|---|
AFTER_INTERCEPTOR, BEFORE_INTERCEPTOR, INDEX_ACTION |
| Constructor Summary | |
|---|---|
DefaultGrailsControllerClass(Class clazz)
|
|
| 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 viewName)
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. |
void |
setScaffolding(boolean scaffolding)
|
| Methods inherited from class org.codehaus.groovy.grails.commons.AbstractInjectableGrailsClass |
|---|
byName, byType, getAvailable |
| Methods inherited from class org.codehaus.groovy.grails.commons.AbstractGrailsClass |
|---|
getClazz, getFullName, getLogicalPropertyName, getMetaClass, getName, getNaturalName, getPackageName, getPropertyName, getPropertyOrStaticPropertyOrFieldValue, getPropertyValue, getPropertyValue, getReference, getShortName, hasProperty, newInstance, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 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 |
|---|
public static final String CONTROLLER
| Constructor Detail |
|---|
public DefaultGrailsControllerClass(Class clazz)
| Method Detail |
|---|
public String[] getURIs()
GrailsControllerClassGets the list of all possible URI's available in this controller.
getURIs in interface GrailsControllerClasspublic boolean mapsToURI(String uri)
GrailsControllerClassTests if a controller maps to a given URI.
mapsToURI in interface GrailsControllerClasspublic String getViewByURI(String uri)
GrailsControllerClass
getViewByURI in interface GrailsControllerClassuri - the name of URI
public String getClosurePropertyName(String uri)
GrailsControllerClassReturns a closure property name for a specific URI or null if the URI does not map to a closure.
getClosurePropertyName in interface GrailsControllerClassuri - the URI of the request
public String getViewByName(String viewName)
GrailsControllerClass
getViewByName in interface GrailsControllerClassviewName - The name of the closure
public boolean isScaffolding()
isScaffolding in interface GrailsControllerClasspublic Class getScaffoldedClass()
getScaffoldedClass in interface GrailsControllerClasspublic void setScaffolding(boolean scaffolding)
scaffolding - The scaffolding to set.
public boolean isInterceptedBefore(groovy.lang.GroovyObject controller,
String action)
GrailsControllerClass
isInterceptedBefore in interface GrailsControllerClasscontroller - The instance of the controlleraction - The action to check
public boolean isHttpMethodAllowedForAction(groovy.lang.GroovyObject controller,
String httpMethod,
String actionName)
GrailsControllerClass
isHttpMethodAllowedForAction in interface GrailsControllerClasscontroller - The instance of the controllerhttpMethod - The http request methodactionName - The action to check
public boolean isInterceptedAfter(groovy.lang.GroovyObject controller,
String action)
GrailsControllerClass
isInterceptedAfter in interface GrailsControllerClasscontroller - The controller instanceaction - The action to check
public groovy.lang.Closure getBeforeInterceptor(groovy.lang.GroovyObject controller)
GrailsControllerClass
getBeforeInterceptor in interface GrailsControllerClasscontroller - The controller instance
public groovy.lang.Closure getAfterInterceptor(groovy.lang.GroovyObject controller)
GrailsControllerClass
getAfterInterceptor in interface GrailsControllerClasscontroller - The controller instance
public Set getCommandObjectActions()
getCommandObjectActions in interface GrailsControllerClasspublic Set getCommandObjectClasses()
getCommandObjectClasses in interface GrailsControllerClasspublic Map getFlows()
GrailsControllerClassReturns 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
getFlows in interface GrailsControllerClasspublic boolean isFlowAction(String actionName)
GrailsControllerClass
isFlowAction in interface GrailsControllerClassactionName - The name of the action
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||