KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > woody > binding > Binding


1 /*
2  * Copyright 1999-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 org.apache.cocoon.woody.binding;
17
18 import org.apache.cocoon.woody.formmodel.Widget;
19
20 /**
21  * Binding declares the methods to 'bind' (i.e. 'load' and 'save')
22  * information elements from some back-end model (2nd argument) to and from
23  * a existing Woody Widget.
24  *
25  * @version CVS $Id: Binding.java 30932 2004-07-29 17:35:38Z vgritsenko $
26  */

27 public interface Binding {
28
29     /**
30      * Sets parent binding.
31      * @param binding Parent of this binding.
32      */

33     void setParent(Binding binding);
34
35     /**
36      * Gets binding definition id.
37      */

38     String JavaDoc getId();
39
40     /**
41      * Gets a binding class.
42      * @param id Id of binding class to get.
43      */

44     Binding getClass(String JavaDoc id);
45
46     /**
47      * Loads the information-elements from the objModel to the frmModel.
48      *
49      * @param frmModel
50      * @param objModel
51      */

52     void loadFormFromModel(Widget frmModel, Object JavaDoc objModel)
53             throws BindingException;
54
55     /**
56      * Saves the infortmation-elements to the objModel from the frmModel.
57      * @param frmModel
58      * @param objModel
59      */

60     void saveFormToModel(Widget frmModel, Object JavaDoc objModel)
61             throws BindingException;
62 }
63
Popular Tags