## org.codehaus.groovy.grails.scaffolding
Class DefaultScaffoldRequestHandler

    java.lang.Object
      org.codehaus.groovy.grails.scaffolding.DefaultScaffoldRequestHandler

All Implemented Interfaces:
  ScaffoldRequestHandler

    public class DefaultScaffoldRequestHandler

extends Object
implements ScaffoldRequestHandler

Default implementation of the ScaffoldRequestHandler interface. Uses a ScaffoldDomain to handle basic CRUD operations.

Since:
  0.1 30 Nov 2005
Author:
  Graeme Rocher

Constructor Summary
`DefaultScaffoldRequestHandler()`

Method Summary
`ScaffoldDomain` `getScaffoldDomain()`
`Map` `handleCreate(HttpServletRequest request, HttpServletResponse reponse, ScaffoldCallback callback)` Handles a create request
`Map` `handleDelete(HttpServletRequest request, HttpServletResponse response, ScaffoldCallback callback)` Handles a request to delete a scaffolded instance
`Map` `handleFind(HttpServletRequest request, HttpServletResponse reponse)` Handles a request to find a scaffolded instance
`Map` `handleList(HttpServletRequest request, HttpServletResponse response)` Handles a request to list all scaffolded instances
`Map` `handleSave(HttpServletRequest request, HttpServletResponse reponse, ScaffoldCallback callback)` Handles a request to save a scaffolded instance
`Map` `handleShow(HttpServletRequest request, HttpServletResponse response, ScaffoldCallback callback)` Handles a request to show a scaffolded instance
`Map` `handleUpdate(HttpServletRequest request, HttpServletResponse reponse, ScaffoldCallback callback)` Handles a request to update a scaffolded instance
`void` `setScaffoldDomain(ScaffoldDomain domain)` Sets the domain to use during scaffolding.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultScaffoldRequestHandler

    public DefaultScaffoldRequestHandler()

Method Detail

### setScaffoldDomain

    public void setScaffoldDomain(ScaffoldDomain domain)

  Description copied from interface: `ScaffoldRequestHandler`
  Sets the domain to use during scaffolding. A scaffold domain provides methods to manipulate the scaffolded persistent class

  Specified by:
    `setScaffoldDomain` in interface `ScaffoldRequestHandler`

### getScaffoldDomain

    public ScaffoldDomain getScaffoldDomain()

  Specified by:
    `getScaffoldDomain` in interface `ScaffoldRequestHandler`
  Returns:
    The domain being scaffolded

### handleList

    public Map handleList(HttpServletRequest request,
                          HttpServletResponse response)

  Description copied from interface: `ScaffoldRequestHandler`
  Handles a request to list all scaffolded instances

  Specified by:
    `handleList` in interface `ScaffoldRequestHandler`
  Returns:
    Optionally a map which represents the generated model

### handleShow

    public Map handleShow(HttpServletRequest request,
                          HttpServletResponse response,
                          ScaffoldCallback callback)

  Description copied from interface: `ScaffoldRequestHandler`
  Handles a request to show a scaffolded instance

  Specified by:
    `handleShow` in interface `ScaffoldRequestHandler`
  Returns:
    Optionally a map which represents the generated model

### handleDelete

    public Map handleDelete(HttpServletRequest request,
                            HttpServletResponse response,
                            ScaffoldCallback callback)

  Description copied from interface: `ScaffoldRequestHandler`
  Handles a request to delete a scaffolded instance

  Specified by:
    `handleDelete` in interface `ScaffoldRequestHandler`
  Returns:
    Optionally a map which represents the generated model

### handleCreate

    public Map handleCreate(HttpServletRequest request,
                            HttpServletResponse reponse,
                            ScaffoldCallback callback)

  Description copied from interface: `ScaffoldRequestHandler`
  Handles a create request

  Specified by:
    `handleCreate` in interface `ScaffoldRequestHandler`
  Returns:
    Optionally a map which reperesents the generated model

### handleSave

    public Map handleSave(HttpServletRequest request,
                          HttpServletResponse reponse,
                          ScaffoldCallback callback)

  Description copied from interface: `ScaffoldRequestHandler`
  Handles a request to save a scaffolded instance

  Specified by:
    `handleSave` in interface `ScaffoldRequestHandler`
  Returns:
    Optionally a map which represents the generated model

### handleUpdate

    public Map handleUpdate(HttpServletRequest request,
                            HttpServletResponse reponse,
                            ScaffoldCallback callback)

  Description copied from interface: `ScaffoldRequestHandler`
  Handles a request to update a scaffolded instance

  Specified by:
    `handleUpdate` in interface `ScaffoldRequestHandler`
  Returns:
    Optionally a map which represents the generated model

### handleFind

    public Map handleFind(HttpServletRequest request,
                          HttpServletResponse reponse)

  Description copied from interface: `ScaffoldRequestHandler`
  Handles a request to find a scaffolded instance

  Specified by:
    `handleFind` in interface `ScaffoldRequestHandler`
  Returns:
    Optionally a map which represents the generated model

Copyright (c) 2005-2006 The Grails project