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: BeanPrefixOutjection.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.engine.testelements.outputs;
09:
10: import com.uwyn.rife.engine.Element;
11:
12: public class BeanPrefixOutjection extends Element {
13: public void setInbean1(BeanImpl inbean) {
14: }
15:
16: public BeanImpl getOutbean1() {
17: BeanImpl bean = new BeanImpl();
18: bean.setString("the string");
19: bean.setStringbuffer(new StringBuffer("the stringbuffer"));
20: bean.setInt(23154);
21: bean.setInteger(new Integer(893749));
22: bean.setChar('u');
23: bean.setCharacter(new Character('R'));
24: bean.setBoolean(true);
25: bean.setBooleanObject(new Boolean(false));
26: bean.setByte((byte) 120);
27: bean.setByteObject(new Byte((byte) 21));
28: bean.setDouble(34878.34);
29: bean.setDoubleObject(new Double(25435.98));
30: bean.setFloat((float) 3434.76);
31: bean.setFloatObject(new Float((float) 6534.8));
32: bean.setLong(34347897L);
33: bean.setLongObject(new Long(2335454L));
34: bean.setShort((short) 32);
35: bean.setShortObject(new Short((short) 12));
36:
37: return bean;
38: }
39:
40: public void processElement() {
41: if (hasInputValue("prefix_string")) {
42: print(getInput("prefix_string")
43: + ","
44: + getInput("prefix_stringbuffer")
45: + ","
46: + getInput("prefix_int")
47: + ","
48: + getInput("prefix_integer")
49: + ","
50: + getInput("prefix_char")
51: + ","
52: + getElementInfo()
53: .containsInput("prefix_character") + ","
54: + getInput("prefix_boolean") + ","
55: + getInput("prefix_booleanObject") + ","
56: + getElementInfo().containsInput("prefix_byte")
57: + "," + getInput("prefix_byteObject") + ","
58: + getInput("prefix_double") + ","
59: + getInput("prefix_doubleObject") + ","
60: + getInput("prefix_float") + ","
61: + getInput("prefix_floatObject") + ","
62: + getInput("prefix_long") + ","
63: + getInput("prefix_longObject") + ","
64: + getInput("prefix_short") + ","
65: + getInput("prefix_shortObject"));
66: } else {
67: exit("exit");
68: }
69: }
70: }
|