KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > model > form > FormMetaData


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.form;
8
9
10 import java.util.Map JavaDoc;
11
12 import com.inversoft.verge.mvc.MVCConstants;
13 import com.inversoft.verge.mvc.MVCException;
14 import com.inversoft.verge.mvc.MVCRegistry;
15 import com.inversoft.verge.mvc.model.AbstractMetaData;
16 import com.inversoft.verge.mvc.model.ModelHandler;
17
18
19 /**
20  * <p>
21  * This class is the meta data for the form definition
22  * </p>
23  *
24  * @author Brian Pontarelli
25  * @since 2.0
26  * @version 2.0
27  */

28 public class FormMetaData extends AbstractMetaData {
29
30     /**
31      * Constructor for FormMetaData
32      */

33     public FormMetaData(String JavaDoc definition) throws MVCException {
34         super(definition);
35     }
36
37     /**
38      * Constructor for FormMetaData
39      */

40     public FormMetaData(String JavaDoc id, String JavaDoc property) {
41         super(id, property);
42     }
43
44
45     /**
46      * Sets the property of this model
47      *
48      * @param property The name of the property of this model
49      */

50     public void setProperty(String JavaDoc property) {
51         this.property = property;
52     }
53
54     /**
55      * Returns null because form models do not use extra parameters
56      *
57      * @see com.inversoft.verge.mvc.model.MetaData#getExtraParams()
58      */

59     public Map JavaDoc getExtraParams() {
60         return null;
61     }
62
63     /**
64      * Returns the instance of the FormModelHandler class. This is the
65      * handler that uses this MetaData
66      *
67      * @return The instance of the FormModelHandler class from the
68      * MVCRegistry
69      */

70     public ModelHandler getModelHandler() {
71         return MVCRegistry.lookupModelHandler(MVCConstants.FORM_NAME);
72     }
73
74     /**
75      * Returns form
76      *
77      * @return form
78      */

79     public String JavaDoc getModelSystem() {
80         return MVCConstants.FORM_NAME;
81     }
82 }
Popular Tags