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: NamedBeanNormalInjection.java 3693 2007-03-14 10:55:56Z gbevin $
07: */
08: package com.uwyn.rife.engine.testelements.submission;
09:
10: import com.uwyn.rife.engine.Element;
11: import com.uwyn.rife.site.ValidationError;
12:
13: import java.util.Set;
14:
15: public class NamedBeanNormalInjection extends Element {
16: private BeanImpl bean;
17:
18: public void setThe_bean(BeanImpl bean) {
19: this .bean = bean;
20: }
21:
22: public void processElement() {
23: boolean notnumeric_int = false;
24: boolean notnumeric_double = false;
25: boolean notnumeric_longobject = false;
26:
27: Set<ValidationError> errors = bean.getValidationErrors();
28: for (ValidationError error : errors) {
29: print(error.getIdentifier() + " : " + error.getSubject()
30: + "\n");
31: }
32: print(bean.getEnum() + "," + bean.getString() + ","
33: + bean.getStringbuffer() + "," + bean.getInt() + ","
34: + bean.getInteger() + "," + bean.getChar() + ","
35: + bean.getCharacter() + "," + bean.isBoolean() + ","
36: + bean.getBooleanObject() + "," + bean.getByte() + ","
37: + bean.getByteObject() + "," + bean.getDouble() + ","
38: + bean.getDoubleObject() + "," + bean.getFloat() + ","
39: + bean.getFloatObject() + "," + bean.getLong() + ","
40: + bean.getLongObject() + "," + bean.getShort() + ","
41: + bean.getShortObject());
42: }
43: }
|