KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > faces > convert > Converter


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package javax.faces.convert;
17
18 import javax.faces.component.UIComponent;
19 import javax.faces.context.FacesContext;
20
21 /**
22  * $Log: Converter.java,v $
23  * Revision 1.7 2004/07/01 22:00:51 mwessendorf
24  * ASF switch
25  *
26  * Revision 1.6 2004/06/07 12:17:36 mwessendorf
27  * throws now ConverterException
28  *
29  * Revision 1.5 2004/03/26 12:08:41 manolito
30  * Exceptions in getAsString now catched and
31  * more relaxed Number casting in all number converters
32  *
33  * @author Thomas Spiegl (latest modification by $Author: mwessendorf $)
34  * @version $Revision: 1.7 $ $Date: 2004/07/01 22:00:51 $
35  */

36 public interface Converter
37 {
38     Object JavaDoc getAsObject(FacesContext context,
39                        UIComponent component,
40                        String JavaDoc value) throws ConverterException;
41
42     String JavaDoc getAsString(FacesContext context,
43                        UIComponent component,
44                        Object JavaDoc value) throws ConverterException;
45 }
46
Popular Tags