org.springframework.roo.addon.web.mvc.controller
Annotation Type RooWebScaffold


@Retention(value=SOURCE)
@Target(value=TYPE)
public @interface RooWebScaffold

Indicates a type that requires ROO controller support.

This annotation will cause ROO to produce code that would typically appear in MVC controllers. Importantly, such code does NOT depend on any singletons and is intended to safely serialise. In the current release this code will be emitted to an ITD.

The following functionality will be introduced in the ITD:

There are two cases in which ROO will not emit one or more of the above artifacts:

Since:
1.0
Author:
Stefan Schmidt

Required Element Summary
 Class<?> formBackingObject
          Every controller is responsible for a single form backing object.
 String path
          All view-related artifacts for a specific controller are stored in a sub-directory under WEB-INF/views/path.
 
Optional Element Summary
 boolean create
          Creates a create() method which allows the creation of a new entity.
 boolean delete
          Creates a delete() method which deletes an entity for a given id.
 boolean exposeFinders
          Will scan the formBackingObjects for installed finder methods and expose them when configured.
 boolean exposeJson
          Will scan the formBackingObjects for org.springframework.roo.addon.json.RooJson annotation and expose json when configured.
 boolean update
          Creates an update() method which allows alteration of an existing entity.
 

Element Detail

path

public abstract String path
All view-related artifacts for a specific controller are stored in a sub-directory under WEB-INF/views/path. The path parameter defines the name of this sub-directory or path. This path is also used to define the restful resource in the URL to which the controller is mapped.

Returns:
The view path.

formBackingObject

public abstract Class<?> formBackingObject
Every controller is responsible for a single form backing object. The form backing object defined here class will be exposed in a RESTful way.

delete

public abstract boolean delete
Creates a delete() method which deletes an entity for a given id.

Returns:
indicates if the delete() method should be provided (defaults to "true"; optional)
Default:
true

create

public abstract boolean create
Creates a create() method which allows the creation of a new entity.

Returns:
indicates if the create() method should be provided (defaults to "true"; optional)
Default:
true

update

public abstract boolean update
Creates an update() method which allows alteration of an existing entity.

Returns:
indicates if the update() method should be provided (defaults to "true"; optional)
Default:
true

exposeFinders

public abstract boolean exposeFinders
Will scan the formBackingObjects for installed finder methods and expose them when configured.

Returns:
indicates if the finders methods should be provided (defaults to "true"; optional)
Default:
true

exposeJson

public abstract boolean exposeJson
Will scan the formBackingObjects for org.springframework.roo.addon.json.RooJson annotation and expose json when configured.

Returns:
indicates if the json methods should be provided (defaults to "true"; optional)
Default:
true


Copyright © 2011. All Rights Reserved.