KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > wcf > convert > Converter


1 /*
2  * ====================================================================
3  * This software is subject to the terms of the Common Public License
4  * Agreement, available at the following URL:
5  * http://www.opensource.org/licenses/cpl.html .
6  * Copyright (C) 2003-2004 TONBELLER AG.
7  * All Rights Reserved.
8  * You must accept the terms of that agreement to use this software.
9  * ====================================================================
10  *
11  *
12  */

13 package com.tonbeller.wcf.convert;
14
15 import java.util.Map JavaDoc;
16
17 import org.w3c.dom.Node JavaDoc;
18
19 import com.tonbeller.wcf.format.FormatException;
20 import com.tonbeller.wcf.format.Formatter;
21
22 /**
23  * converts bean property values to DOM ELements representing HTML forms.
24  *
25  * @author av
26  */

27 public interface Converter {
28
29   /**
30    * converts request parameters to DOM element attributes and bean properties
31    */

32   void validate(Map JavaDoc httpParamSource, Map JavaDoc fileParamSource, Node JavaDoc domTarget, Object JavaDoc beanTarget) throws ConvertException, FormatException;
33
34   /**
35    * converts bean properties to DOM element attributes
36    */

37   void revert(Object JavaDoc beanSource, Node JavaDoc domTarget) throws ConvertException;
38
39   /**
40    * sets the formatter to use for conversions
41    */

42   void setFormatter(Formatter formatter);
43
44   /**
45    * returns the formatter used for conversions. This may
46    * be used to add new handlers for application specific
47    * data types.
48    */

49   Formatter getFormatter();
50 }
51
Popular Tags