org.davesag.generica.controller
Interface ActionController
- All Superinterfaces:
- Controller
- All Known Subinterfaces:
- Actor, Creator, Deleter, HomepageChooser, Lister, Loader, PasswordHelperController, Presenter, Saver, Summariser, TargetActor, UploadController, UserLoginController, UserRegistrationController
- All Known Implementing Classes:
- AbstractActionController, AbstractUserProfileController, GenericContentSelector, SimpleUploadController
- public interface ActionController
- extends Controller
ActionController implementations provide the core business
logic for the Struts actions.
By delegating the work to controllers we reduce the complexity of the
actions themselves and allow the business logic to be captured in one spot.
Controllers are dynamically loaded by the actions and so updating business
logic can be a simple matter of adding a new jar with the right controllers,
and updating the struts-config.xml file. 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.
- Since:
- Generica 1.0
- Version:
- CVS Revision $Id: ActionController.java,v 1.2 2004/03/30 10:12:56 norm Exp $
- Author:
- Dave Sag
http://www.davesag.com
setAction
public void setAction(AbstractAction action)
- Sets the action that is updating this controller.
- Parameters:
action - The action that is updating this controller.
Dave Sag Generica API version 0.5.9 - (prerelease) Copyright © 2003 - 2004 Dave Sag.