KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > model > ModelHandler


1 /*
2  * Copyright (c) 2003, Inversoft
3  *
4  * This software is distribuable under the GNU Lesser General Public License.
5  * For more information visit gnu.org.
6  */

7 package com.inversoft.verge.mvc.model;
8
9
10 import java.util.Map JavaDoc;
11
12 import com.inversoft.verge.mvc.MVCException;
13 import com.inversoft.verge.mvc.MVCRequest;
14
15
16 /**
17  * <p>
18  * This interface describes the method which the default
19  * Inversoft MVC implementation populates the model objects
20  * values.
21  * </p>
22  *
23  * @author Brian Pontarelli
24  * @since 2.0
25  * @version 2.0
26  */

27 public interface ModelHandler {
28
29     /**
30      * <p>
31      * Retrieves the model object's current value using the value object given.
32      * </p>
33      *
34      * @param mvcRequest The MVCRequest that may be used to help facilitate
35      * retrieval of the model object's value
36      * @param definition The model defintion that describes how the retrieve
37      * the model object's value
38      * @param model The ModelResolution which contains the model object whose
39      * value is being retrieved
40      * @param extraParams Any extra parameters that may have been specified and
41      * were parsed by the ModelParser
42      * @return The model object's current value
43      * @throws com.inversoft.verge.mvc.MVCException If there was a problem retrieving the model object's
44      * value
45      */

46     Object JavaDoc getValue(MVCRequest mvcRequest, String JavaDoc definition, ModelResolution model,
47             Map JavaDoc extraParams)
48     throws MVCException;
49
50     /**
51      * <p>
52      * Populates the model objects value using the value object given.
53      * </p>
54      *
55      * @param mvcRequest The MVCRequest that may be used to help facilitate
56      * setting of the model object's value
57      * @param definition The model defintion that describes how the set the
58      * model object's value
59      * @param model The ModelResolution which contains the model object whose
60      * value is being set
61      * @param value The value to set into the model object
62      * @param extraParams Any extra parameters that may have been specified and
63      * were parsed by the ModelParser
64      * @throws com.inversoft.verge.mvc.MVCException If there was a problem setting the model object's
65      * value
66      */

67     void setValue(MVCRequest mvcRequest, String JavaDoc definition, ModelResolution model,
68             Object JavaDoc value, Map JavaDoc extraParams)
69     throws MVCException;
70 }
Popular Tags