KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > model > actionflow > ActionFlowModelMetaData


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.actionflow;
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 used to help determine the action flow model
22  * object from the form configuration.
23  * </p>
24  *
25  * @author Brian Pontarelli
26  * @since 2.0
27  * @version 2.0
28  */

29 public class ActionFlowModelMetaData extends AbstractMetaData {
30
31     /**
32      * Constructs a new <code>ActionFlowModelMetaData</code> that uses the defintion
33      * given to determine the id and property name, the parameters to determine
34      * the class and scope of the model.
35      *
36      * @param definition The definition of the model's id and property
37      */

38     public ActionFlowModelMetaData(String JavaDoc definition) throws MVCException {
39         super(definition);
40     }
41
42     /**
43      * Constructs a new <code>ActionFlowModelMetaData</code> with the given
44      * information
45      *
46      * @param id The id of the model object in a scope
47      * @param property The name of the property of the model
48      */

49     public ActionFlowModelMetaData(String JavaDoc id, String JavaDoc property) {
50         super(id, property);
51     }
52
53
54     /**
55      * Sets the property of this action flow model
56      *
57      * @param property The name of the property of this action flow model
58      */

59     public void setProperty(String JavaDoc property) {
60         super.property = property;
61     }
62
63     /**
64      * Constructs the parameters map from the information in the instance. This
65      * map can be used when constructing the ModelMVCInfo.
66      *
67      * @return Always null
68      */

69     public Map JavaDoc getExtraParams() {
70         return null;
71     }
72
73     /**
74      * Returns the instance of the ActionFlowModelHandler class. This is the
75      * handler that uses this MetaData
76      *
77      * @return The instance of the ActionFlowModelHandler class from the MVCRegistry
78      */

79     public ModelHandler getModelHandler() {
80         return MVCRegistry.lookupModelHandler(MVCConstants.ACTIONFLOW_NAME);
81     }
82
83     /**
84      * Returns actionflow
85      *
86      * @return actionflow
87      */

88     public String JavaDoc getModelSystem() {
89         return MVCConstants.ACTIONFLOW_NAME;
90     }
91 }
Popular Tags