org.davesag.generica.controller
Interface Summariser

All Superinterfaces:
ActionController, Controller
All Known Implementing Classes:
AbstractUserProfileController

public interface Summariser
extends ActionController

An implementation of the Summariser interface must be able to summarise an object for use by a GUI or similar. A typical use scenrio involves displaying of an object whose actual values are raw data, ie a language code, not a localised language name. the summary will populate a summary object with the full localised name of the language.

Tell the action which Summariser to use by specifying a summariser parameter in the Action's parameter config, eg:

         <action
                path="/admin/handleeditsitecopy"
                type="org.davesag.generica.servlet.action.HandleUpdateAction"
                parameter="pipe=editsitecopy;
                                        form-controller=com.myapp.controller.SiteCopyController;
                                        saver=com.myapp.controller.SiteCopyController;
                                        summariser=com.myapp.controller.SiteCopyController"
                name="sitecopy"
                scope="request"
                validate="true"
                input="/admin/editsitecopy.do">
                <forward name="success" path="thanks.editsitecopy.page"/>
        </action>
 

Note in the above example all three controllers are embodied in the same class. This is typical for generic actions and then smaller controller classes can be used to provide controllers as required.

Since:
Generica 1.0
Version:
CVS Revision $Id: Summariser.java,v 1.2 2004/03/30 10:12:56 norm Exp $
Author:
Dave Sag http://www.davesag.com
See Also:
GenericForm

Method Summary
 Summary summarise(Object o)
          Summarises the supplied object for use by GUIs.
 
Methods inherited from interface org.davesag.generica.controller.ActionController
setAction
 
Methods inherited from interface org.davesag.generica.controller.Controller
setForm, setRequest, setResponse
 

Method Detail

summarise

public Summary summarise(Object o)
                  throws Exception
Summarises the supplied object for use by GUIs.

Parameters:
o - The object to summarise.
Returns:
The summary.
Throws:
Exception - if something went wrong.


Dave Sag Generica API version 0.5.9 - (prerelease) Copyright 2003 - 2004 Dave Sag.