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: BeanPrefixSource.java 3714 2007-04-08 02:57:38Z gbevin $
07: */
08: package com.uwyn.rife.engine.testelements.exits;
09:
10: import com.uwyn.rife.config.RifeConfig;
11: import com.uwyn.rife.engine.Element;
12: import java.util.Calendar;
13:
14: public class BeanPrefixSource extends Element {
15: public void processElement() {
16: Calendar cal = Calendar.getInstance(RifeConfig.Tools
17: .getDefaultTimeZone());
18: cal.clear();
19:
20: BeanImpl1 bean = new BeanImpl1();
21: bean.setString1("stringvalue1");
22: bean.setString2("stringvalue2");
23: bean.setString3("stringvalue3");
24: bean.setEnum4(BeanImpl1.Day.WEDNESDAY);
25: cal.set(2007, 2, 13, 8, 13, 24);
26: bean.setDate5(cal.getTime());
27:
28: setNamedOutputBean("outbean1", bean);
29:
30: exit("beanexit");
31: }
32: }
|