|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.scaffolding.DefaultGrailsScaffolder
public class DefaultGrailsScaffolder
The default implementation of scaffolding for Grails domain class and controller. Implements the GrailsScaffolder interface. Requires a ScaffoldRequestHandler and ScaffoldResponseHandlerFactory. The ScaffoldRequestHandler is responsible for handling requests to CRUD operations, whilst the ScaffoldResponseHandlerFactory creates ScaffoldResponseHandler instances that are responsible for delivering the response to the user in whatever format is required.
GrailsScaffolder
,
ScaffoldRequestHandler
,
ScaffoldResponseHandlerFactory
Nested Class Summary | |
---|---|
(package private) static class |
DefaultGrailsScaffolder.AbstractAction
Abstract base class that extends closure and retrieves the necessary arguments from the controller This is used to inject closure properties into controllers so controller actions appear as if by magic. |
(package private) class |
DefaultGrailsScaffolder.CreateAction
A closure that handles a call to a scaffolded list action |
(package private) class |
DefaultGrailsScaffolder.DeleteAction
A closure action that implements deletion of a scaffolded instance by id. |
(package private) class |
DefaultGrailsScaffolder.EditAction
A closure action that implements editing a scaffolded instance by id. |
(package private) class |
DefaultGrailsScaffolder.IndexAction
A closure that handles a call to a scaffolded list action |
(package private) class |
DefaultGrailsScaffolder.ListAction
A closure that handles a call to a scaffolded list action |
(package private) class |
DefaultGrailsScaffolder.SaveAction
A closure action that implements the saving of new scaffoled instances. |
(package private) class |
DefaultGrailsScaffolder.ShowAction
A closure action that implements showing a scaffolded instance by id. |
(package private) class |
DefaultGrailsScaffolder.UpdateAction
A closure action that implements the updating of an existing scaffoled instances. |
Field Summary | |
---|---|
protected static Map |
actionClassToNameMap
|
protected static Map |
actions
|
Fields inherited from interface org.codehaus.groovy.grails.scaffolding.GrailsScaffolder |
---|
ACTION_NAMES, CREATE_ACTION, DELETE_ACTION, EDIT_ACTION, FIND_ACTION, INDEX_ACTION, LIST_ACTION, SAVE_ACTION, SEARCH_ACTION, SHOW_ACTION, UPDATE_ACTION |
Constructor Summary | |
---|---|
DefaultGrailsScaffolder()
|
Method Summary | |
---|---|
groovy.lang.Closure |
getAction(groovy.lang.GroovyObject controller,
String actionName)
|
String |
getActionName(groovy.lang.Closure action)
Returns the action name for the specified closure instance |
ScaffoldRequestHandler |
getScaffoldRequestHandler()
|
String[] |
getSupportedActionNames()
|
void |
setScaffoldRequestHandler(ScaffoldRequestHandler scaffoldRequestHandler)
|
void |
setScaffoldResponseHandlerFactory(ScaffoldResponseHandlerFactory scaffoldResponseHandlerFactory)
|
boolean |
supportsAction(String actionName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Map actions
protected static Map actionClassToNameMap
Constructor Detail |
---|
public DefaultGrailsScaffolder()
Method Detail |
---|
public boolean supportsAction(String actionName)
supportsAction
in interface GrailsScaffolder
actionName
- The name of the action
public groovy.lang.Closure getAction(groovy.lang.GroovyObject controller, String actionName)
getAction
in interface GrailsScaffolder
public void setScaffoldRequestHandler(ScaffoldRequestHandler scaffoldRequestHandler)
scaffoldRequestHandler
- The scaffoldRequestHandler to set.public void setScaffoldResponseHandlerFactory(ScaffoldResponseHandlerFactory scaffoldResponseHandlerFactory)
scaffoldResponseHandlerFactory
- The scaffoldResponseHandlerFactory to set.public String[] getSupportedActionNames()
getSupportedActionNames
in interface GrailsScaffolder
public String getActionName(groovy.lang.Closure action)
GrailsScaffolder
getActionName
in interface GrailsScaffolder
action
- The closure action
public ScaffoldRequestHandler getScaffoldRequestHandler()
getScaffoldRequestHandler
in interface GrailsScaffolder
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |