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