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: BeanHandlerPlain.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.template;
09:
10: import com.uwyn.rife.cmf.MimeType;
11: import com.uwyn.rife.site.FormBuilder;
12: import com.uwyn.rife.tools.BeanUtils;
13: import com.uwyn.rife.tools.exceptions.BeanUtilsException;
14: import java.util.Map;
15:
16: public class BeanHandlerPlain extends AbstractBeanHandler {
17: BeanHandlerPlain() {
18: }
19:
20: public static BeanHandlerPlain getInstance() {
21: return BeanHandlerPlainSingleton.INSTANCE;
22: }
23:
24: public MimeType getMimeType() {
25: return MimeType.TEXT_PLAIN;
26: }
27:
28: public FormBuilder getFormBuilder() {
29: return null;
30: }
31:
32: protected Map<String, Object> getPropertyValues(Template template,
33: Object bean, String prefix) throws BeanUtilsException {
34: return BeanUtils.getPropertyValues(bean, template
35: .getAvailableValueIds(), null, prefix);
36: }
37: }
|