01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: AutolinkAnnotationDestination.java 3693 2007-03-14 10:55:56Z gbevin $
07: */
08: package com.uwyn.rife.engine.testelements.exits;
09:
10: import com.uwyn.rife.engine.Element;
11: import com.uwyn.rife.engine.annotations.Elem;
12: import com.uwyn.rife.engine.annotations.InBeanProperty;
13: import com.uwyn.rife.engine.annotations.InputProperty;
14: import com.uwyn.rife.tools.BeanUtils;
15:
16: @Elem(id="AUTOLINK_ANN_DST")
17: public class AutolinkAnnotationDestination extends Element {
18: private String mValue1;
19: private String mValue2;
20: private String mValue4;
21: private BeanImpl1 mBean1;
22: private BeanImpl2 mBean3;
23:
24: @InputProperty
25: public void setValue1(String value1) {
26: mValue1 = value1;
27: }
28:
29: @InputProperty
30: public void setValue2(String value2) {
31: mValue2 = value2;
32: }
33:
34: @InputProperty
35: public void setValue4(String value4) {
36: mValue4 = value4;
37: }
38:
39: @InBeanProperty
40: public void setBean1(BeanImpl1 bean1) {
41: mBean1 = bean1;
42: }
43:
44: @InBeanProperty(prefix="in_")
45: public void setBean3(BeanImpl2 bean3) {
46: mBean3 = bean3;
47: }
48:
49: public void processElement() {
50: print(mValue1 + "," + mValue2 + "," + mValue4 + "\n");
51: print(mBean1.getString1()
52: + ","
53: + mBean1.getString2()
54: + ","
55: + mBean1.getString3()
56: + ","
57: + mBean1.getEnum4()
58: + ","
59: + BeanUtils.getConcisePreciseDateFormat().format(
60: mBean1.getDate5()) + "\n");
61: print(mBean3.getEnum4() + "," + mBean3.getDate5() + ","
62: + mBean3.getString6() + "," + mBean3.getString7() + ","
63: + mBean3.getString8() + "\n");
64: }
65: }
|