View Javadoc

1   package com.sri.common.controller;
2   
3   import com.jcorporate.expresso.core.controller.Controller;
4   import com.jcorporate.expresso.core.controller.ControllerException;
5   import com.jcorporate.expresso.core.controller.ExpressoRequest;
6   import com.jcorporate.expresso.core.controller.ExpressoResponse;
7   import com.jcorporate.expresso.core.db.DBException;
8   
9   /***
10   * <p>Title: EMO</p>
11   * <p/>
12   * <p>Description: </p>
13   * <p/>
14   * <p>Copyright: Copyright (c) 2003</p>
15   * <p/>
16   * <p>Company: </p>
17   *
18   * @author Michael Rimov
19   * @version 1.0
20   */
21  public class TestStateHandler implements StateHandler {
22      private Controller myOwner;
23  
24      public int handleRequestCalled = 0;
25  
26      public TestStateHandler(Controller owner) {
27          myOwner = owner;
28      }
29  
30  
31      public Controller getMyOwner() {
32          return myOwner;
33      }
34  
35      /***
36       * Called to handle the request.
37       *
38       * @param request  ExpressoRequest The Function's ExpressoRequest
39       *                 object.
40       * @param response ExpressoResponse The Function's ExpressoResponse
41       *                 object.
42       * @throws DBException            upon underlying database exception error.
43       * @throws ControllerException    upon underlying ControllerException error.
44       * @throws NonHandleableException if the state attempts a transition
45       *                                that throws a NonHandleableException
46       */
47      public void handleRequest(final ExpressoRequest request, final ExpressoResponse response) throws DBException,
48              ControllerException {
49          handleRequestCalled++;
50      }
51  }