| 1 | /* |
|---|
| 2 | * To change this license header, choose License Headers in Project Properties. |
|---|
| 3 | * To change this template file, choose Tools | Templates |
|---|
| 4 | * and open the template in the editor. |
|---|
| 5 | */ |
|---|
| 6 | package scriptbuilder.structures.events; |
|---|
| 7 | |
|---|
| 8 | import java.util.ArrayList; |
|---|
| 9 | import scriptbuilder.structures.ScriptEvent; |
|---|
| 10 | |
|---|
| 11 | /** |
|---|
| 12 | * Data model for a CMS evaluatiion event. A CMS event has a location, a set of |
|---|
| 13 | * messages, an ID, and a type. It also is an evaluation event. |
|---|
| 14 | * |
|---|
| 15 | * @author Bryan McGuffin |
|---|
| 16 | */ |
|---|
| 17 | public class CMSEvaluationEvent extends ScriptEvent implements EvaluationEventInterface |
|---|
| 18 | { |
|---|
| 19 | |
|---|
| 20 | public CMSEvaluationEvent() |
|---|
| 21 | { |
|---|
| 22 | super(ScriptEventType.CMS_EVAL_EVENT); |
|---|
| 23 | } |
|---|
| 24 | |
|---|
| 25 | public String location = ""; |
|---|
| 26 | |
|---|
| 27 | public ArrayList<String> message = new ArrayList<String>(); |
|---|
| 28 | |
|---|
| 29 | public String cmsID = ""; |
|---|
| 30 | |
|---|
| 31 | public String cmsType = ""; |
|---|
| 32 | |
|---|
| 33 | public ArrayList<String> expectedAction = new ArrayList<String>(); |
|---|
| 34 | |
|---|
| 35 | @Override |
|---|
| 36 | public ArrayList<String> getExpectedActions() |
|---|
| 37 | { |
|---|
| 38 | return expectedAction; |
|---|
| 39 | } |
|---|
| 40 | |
|---|
| 41 | @Override |
|---|
| 42 | public void addAction(String act) |
|---|
| 43 | { |
|---|
| 44 | expectedAction.add(act); |
|---|
| 45 | } |
|---|
| 46 | |
|---|
| 47 | @Override |
|---|
| 48 | public void updateAction(int index, String act) |
|---|
| 49 | { |
|---|
| 50 | expectedAction.set(index, act); |
|---|
| 51 | } |
|---|
| 52 | |
|---|
| 53 | @Override |
|---|
| 54 | public void removeAction(int index) |
|---|
| 55 | { |
|---|
| 56 | expectedAction.remove(index); |
|---|
| 57 | } |
|---|
| 58 | } |
|---|