Interface StateHandler

All Known Implementing Classes:
DoAddTag, DoAddWizard, DoCancel, DoCancel, DoChooseCriteria, DoChooseCriteria, DoChooseNodeStep, DoChooseNodeStep, DoChooseParts, DoChooseParts, DoDelete, DoDeleteWizard, DoFilterNodes, EditWizard, ListWizards, PromptAddTag, PromptAddWizard, PromptChooseCriteria, PromptChooseCriteria, PromptChooseNode, PromptChooseNode, PromptChooseParts, PromptChooseParts, PromptDeleteTag, PromptDeleteWizard, PromptEditWizard, PromptEditWizard, PromptInstructions, PromptModelField, PromptNodeAttribute, PromptNodeInstance, PromptPicklist, PromptSelectModel, PromptStepType, PromptTextEntry, RunWizard, StepDefinition, TestStateHandler, ViewNodeAsTree

public interface StateHandler

This interface is an alternative for external state classes produced inside expresso. In the case of a state handler, all that happens is that this class is allocated and called within the function call to the state. It allows delegation to keep Expresso controllers from becoming behemoths, assists in grouping behavior together and is a step towards taming the wild 'all-in-one' class behavior that has become common in Expresso controllers.

Michael Rimov

Method Summary
 void handleRequest(ExpressoRequest request, ExpressoResponse response)
          Called to handle the request.

Method Detail


void handleRequest(ExpressoRequest request,
                   ExpressoResponse response)
                   throws DBException,
Called to handle the request. Here's an example of the usage within an Expresso Controller state handler. It is assumed that the class MyHandler implements the StateHandler interface.

 protected void runMyState(final ControllerRequest request,
        final ControllerResponse response) throws ControllerException, DBException {

MyHander handler = new MyHandler(); handler.handleRequest(request,response); }

request - ControllerRequest The Function's ControllerRequest object.
response - ControllerResponse The Function's ControllerResponse object.
DBException - upon underlying database exception error.
ControllerException - upon underlying ControllerException error.
NonHandleableException - if the state attempts a transition that throws a NonHandleableException

Copyright © 2004-2006 Codeguild, Inc.. All Rights Reserved.