1 package com.sri.emo.annotations;
2
3 import com.jcorporate.expresso.core.controller.State;
4 import com.jcorporate.expresso.core.dbobj.DBObject;
5 import com.sri.common.controller.AbstractComponentController;
6 import com.sri.emo.EmoSchema;
7
8 /***
9 * Handles adding and deletion of nodes.
10 *
11 * @author Michael Rimov
12 * @version 1.0
13 */
14 public class NodeTagController extends AbstractComponentController {
15
16 /***
17 *
18 */
19 private static final long serialVersionUID = 1L;
20
21 public String getTitle() {
22 return "NodeTag Controller";
23 }
24
25 public NodeTagController() {
26 super(EmoSchema.class);
27 State s = this.addStateHandler(PromptAddTag.NAME, PromptAddTag.DESCRIPTION, PromptAddTag.class);
28 s.addParameter("nodeId", true, DBObject.INT_MASK);
29
30 s = this.addStateHandler(DoAddTag.NAME, DoAddTag.DESCRIPTION, DoAddTag.class);
31 s.addParameter("nodeId", true, DBObject.INT_MASK);
32
33 s = this.addStateHandler(PromptDeleteTag.NAME, PromptDeleteTag.DESCRIPTION, PromptDeleteTag.class);
34 s.addParameter("tagId", true, DBObject.INT_MASK);
35
36 s = this.addStateHandler(DoDelete.NAME, DoDelete.DESCRIPTION, DoDelete.class);
37 s.addParameter("tagId", true, DBObject.INT_MASK);
38
39 this.setInitialState(PromptAddTag.NAME);
40 }
41
42
43 }