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: BeanHandlerUnsupportedException.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.template.exceptions;
09:
10: import com.uwyn.rife.template.Template;
11:
12: public class BeanHandlerUnsupportedException extends TemplateException {
13: private static final long serialVersionUID = 7166917351543261088L;
14:
15: private Template mTemplate = null;
16: private Object mBean = null;
17:
18: public BeanHandlerUnsupportedException(Template template,
19: Object bean) {
20: super (
21: "The template '"
22: + template.getClass().getName()
23: + "' doesn't support the handling of bean values. This was attempted for bean '"
24: + String.valueOf(bean)
25: + "'"
26: + (bean == null ? "." : " with class '"
27: + bean.getClass().getName() + "'."));
28:
29: mTemplate = template;
30: mBean = bean;
31: }
32:
33: public Template getTemplate() {
34: return mTemplate;
35: }
36:
37: public Object getBean() {
38: return mBean;
39: }
40: }
|