01: package de.schlund.pfixcore.example;
02:
03: import de.schlund.pfixcore.example.iwrapper.TestSelect;
04: import de.schlund.pfixcore.generator.IHandler;
05: import de.schlund.pfixcore.generator.IWrapper;
06: import de.schlund.pfixcore.workflow.Context;
07:
08: /**
09: * Describe class TestSelectHandler here.
10: *
11: *
12: * Created: Tue Jun 13 12:34:23 2006
13: *
14: * @author <a href="mailto:jtl@schlund.de">Jens Lautenbacher</a>
15: * @version 1.0
16: */
17: public class TestSelectHandler implements IHandler {
18:
19: public final void handleSubmittedData(final Context context,
20: final IWrapper wrapper) throws Exception {
21: ContextSimpleData csd = (ContextSimpleData) context
22: .getContextResourceManager()
23: .getResource(
24: "de.schlund.pfixcore.example.ContextSimpleData");
25: TestSelect tsw = (TestSelect) wrapper;
26:
27: csd.reset();
28:
29: if (tsw.getDo_B()) {
30: csd.setValue("call_b", "true");
31: }
32:
33: }
34:
35: public final void retrieveCurrentStatus(final Context context,
36: final IWrapper IWrapper) throws Exception {
37: // nothing
38: }
39:
40: public final boolean needsData(final Context context)
41: throws Exception {
42: return false;
43: }
44:
45: public final boolean prerequisitesMet(final Context context)
46: throws Exception {
47: return true;
48: }
49:
50: public final boolean isActive(final Context context)
51: throws Exception {
52: return true;
53: }
54:
55: }
|