01: package org.ztemplates.test.actions.urlhandler.callbacks.test2;
02:
03: import org.ztemplates.actions.ZAfter;
04: import org.ztemplates.actions.ZBefore;
05: import org.ztemplates.actions.ZGetter;
06: import org.ztemplates.actions.ZMatch;
07: import org.ztemplates.actions.ZSetter;
08:
09: /**
10: */
11: @ZMatch("nested/${value}")
12: public class NestedHandlerImpl implements NestedHandlerInterface {
13: private String value;
14:
15: private int beforeCalled = 0;
16:
17: private int afterCalled = 0;
18:
19: private int afterValueCalled = 0;
20:
21: private int beforeValueCalled = 0;
22:
23: @ZBefore
24: public void before() {
25: beforeCalled++;
26: }
27:
28: @ZAfter
29: public void after() {
30: afterCalled++;
31: }
32:
33: public int getAfterCalled() {
34: return afterCalled;
35: }
36:
37: public int getBeforeCalled() {
38: return beforeCalled;
39: }
40:
41: @ZBefore("value")
42: public void beforeValue() {
43: beforeValueCalled++;
44: }
45:
46: @ZAfter("value")
47: public void afterValue() {
48: afterValueCalled++;
49: }
50:
51: @ZGetter("value")
52: public String getValue() {
53: return value;
54: }
55:
56: @ZSetter("value")
57: public void setValue(String value) {
58: this .value = value;
59: }
60:
61: public int getAfterValueCalled() {
62: return afterValueCalled;
63: }
64:
65: public int getBeforeValueCalled() {
66: return beforeValueCalled;
67: }
68: }
|