1   package com.sri.common.controller;
2   
3   import com.jcorporate.expresso.core.controller.ExpressoRequest;
4   import com.jcorporate.expresso.core.controller.ExpressoResponse;
5   import com.jcorporate.expresso.core.controller.Output;
6   import com.jcorporate.expresso.core.controller.State;
7   import com.sri.emo.EmoSchema;
8   
9   /***
10   * Test Controller to assure that State Handlers were properly code and controller
11   * container properly built.
12   * @author Michael Rimov
13   * @version 1.0
14   */
15  public class ComponentControllerTestModel extends AbstractComponentController {
16      /***
17  	 * 
18  	 */
19  	private static final long serialVersionUID = 1L;
20  
21  	public ComponentControllerTestModel() {
22          super(EmoSchema.class);
23          this.addStateHandler("prompt","This is a prompt state", TestModelStateHandler.class);
24          this.setInitialState("prompt");
25  
26          State s = new State("do", "Test Internal State");
27          this.addState(s);
28      }
29  
30      protected void runDoState(final ExpressoRequest request, final ExpressoResponse response) throws Exception {
31          response.add(new Output("doState", "Got Here"));
32      }
33  
34  }