KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > config > BaseFormConfigMetaData


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.config;
8
9
10 import javax.servlet.ServletRequest JavaDoc;
11
12 import com.inversoft.verge.mvc.MVCException;
13
14
15 /**
16  * <p>
17  * This class is the configuration meta data for the form
18  * configuration. This also provides an interface for locating
19  * the {@link BaseFormConfig} object.
20  * </p>
21  *
22  * @author Brian Pontarelli
23  * @since 2.0
24  * @version 2.0
25  */

26 public abstract class BaseFormConfigMetaData {
27
28     protected String JavaDoc form;
29
30
31     /**
32      * Protected default constructor.
33      */

34     protected BaseFormConfigMetaData() {
35         // No-op
36
}
37
38     /**
39      * Constructs a new <code>BaseFormConfigMetaData</code> using the formName
40      * given.
41      *
42      * @param form (Optional) The name of the form
43      */

44     public BaseFormConfigMetaData(String JavaDoc form) {
45         this.form = form;
46     }
47
48
49     /**
50      * Returns the name of the form
51      *
52      * @return The name of the form
53      */

54     public String JavaDoc getForm() {
55         return form;
56     }
57
58     /**
59      * A Convienence method that looks up the FormConfig from a FormConfigRegistry.
60      * This method takes the SerlvetRequest object but this is optional. However,
61      * we highly suggest that you pass this object in in order to maintain request
62      * consistency. If you do not pass the request in, subsequent calls to this
63      * method could return different BaseFormConfig instances, if the
64      * configuration is reloaded.
65      *
66      * @param request (Optional) The ServletRequest
67      */

68     public abstract BaseFormConfig findFormConfig(ServletRequest JavaDoc request)
69     throws MVCException;
70 }
Popular Tags