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: NamedBeanPrefix.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 NamedBeanPrefix extends Element {
13: public void processElement() {
14: if (hasInputValue("prefix_string")) {
15: BeanImpl bean = getNamedInputBean("globalbean2");
16: print(bean.getString() + "," + bean.getStringbuffer() + ","
17: + bean.getInt() + "," + bean.getInteger() + ","
18: + bean.getChar() + "," + bean.getCharacter() + ","
19: + bean.getBoolean() + "," + bean.getBooleanObject()
20: + "," + bean.getByte() + "," + bean.getByteObject()
21: + "," + bean.getDouble() + ","
22: + bean.getDoubleObject() + "," + bean.getFloat()
23: + "," + bean.getFloatObject() + ","
24: + bean.getLong() + "," + bean.getLongObject() + ","
25: + bean.getShort() + "," + bean.getShortObject());
26: } else {
27: BeanImpl bean = new BeanImpl();
28: bean.setString("the string");
29: bean.setStringbuffer(new StringBuffer("the stringbuffer"));
30: bean.setInt(23154);
31: bean.setInteger(new Integer(893749));
32: bean.setChar('u');
33: bean.setCharacter(new Character('R'));
34: bean.setBoolean(true);
35: bean.setBooleanObject(new Boolean(false));
36: bean.setByte((byte) 120);
37: bean.setByteObject(new Byte((byte) 21));
38: bean.setDouble(34878.34);
39: bean.setDoubleObject(new Double(25435.98));
40: bean.setFloat((float) 3434.76);
41: bean.setFloatObject(new Float((float) 6534.8));
42: bean.setLong(34347897L);
43: bean.setLongObject(new Long(2335454L));
44: bean.setShort((short) 32);
45: bean.setShortObject(new Short((short) 12));
46:
47: setNamedOutputBean("globalbean2", bean);
48:
49: exit("exit");
50: }
51: }
52: }
|