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: NormalInjection.java 3691 2007-03-13 22:32:59Z gbevin $
07: */
08: package com.uwyn.rife.engine.testelements.inputs;
09:
10: import com.uwyn.rife.engine.Element;
11: import com.uwyn.rife.tools.BeanUtils;
12: import java.util.Date;
13:
14: public class NormalInjection extends Element {
15: private String mInput1;
16: private Date mInput2;
17: private Date mInput3;
18:
19: public void setInput1(String input1) {
20: mInput1 = input1;
21: }
22:
23: public void setInput2(Date input2) {
24: mInput2 = input2;
25: }
26:
27: public void setInput3(Date input3) {
28: mInput3 = input3;
29: }
30:
31: public void processElement() {
32: print("another response");
33:
34: if (mInput1 != null) {
35: print(mInput1);
36: }
37: print(",");
38: if (mInput2 != null) {
39: print(BeanUtils.getConcisePreciseDateFormat().format(
40: mInput2));
41: }
42: print(",");
43: if (mInput3 != null) {
44: print(mInput3.getTime());
45: }
46: }
47: }
|