1
2
3
4
5
6 package org.weda.action;
7
8 /**
9 *
10 * @author Mikhail Titov
11 */
12 public class TestActionListener implements ActionListenerService {
13 private boolean beforeExecuteExecuted = false;
14 private boolean afterExecuteExecuted = false;
15 private ActionListenerFilter filter;
16
17 public TestActionListener(){}
18
19 public TestActionListener(ActionListenerFilter filter){
20 this.filter = filter;
21 }
22
23 public void beforeExecute(ActionEvent event) throws Exception {
24 beforeExecuteExecuted=true;
25 }
26
27 public void afterExecute(ActionEvent event) throws Exception {
28 afterExecuteExecuted=true;
29 }
30
31 public ActionListenerFilter getFilter() {
32 return filter;
33 }
34
35 public void setFilter(ActionListenerFilter filter){
36 this.filter = filter;
37 }
38
39 public void resetState(){
40 beforeExecuteExecuted=false;
41 afterExecuteExecuted=false;
42 }
43
44 public boolean isBeforeExecuteExecuted() {
45 return beforeExecuteExecuted;
46 }
47
48 public void setBeforeExecuteExecuted(boolean beforeExecuteExecuted) {
49 this.beforeExecuteExecuted = beforeExecuteExecuted;
50 }
51
52 public boolean isAfterExecuteExecuted() {
53 return afterExecuteExecuted;
54 }
55
56 public void setAfterExecuteExecuted(boolean afterExecuteExecuted) {
57 this.afterExecuteExecuted = afterExecuteExecuted;
58 }
59
60 }