KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > rift > coad > lib > deployment > DeploymentInfo


1 /*
2  * CoadunationLib: The coaduntion implementation library.
3  * Copyright (C) 2006 Rift IT Contracting
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * XMLConfigurationException.java
20  *
21  * DeploymentInfo.java
22  *
23  * The class that stores all the deployment information.
24  */

25
26 // class imports
27
package com.rift.coad.lib.deployment;
28
29 // the private member variables
30
import java.util.Map JavaDoc;
31 import java.util.HashMap JavaDoc;
32
33 /**
34  * The
35  *
36  * @author Brett Chaldecott
37  */

38 public class DeploymentInfo {
39     
40     /**
41      * The information pertaining to this jar deployment object
42      */

43     private String JavaDoc version = null;
44     private String JavaDoc name = null;
45     private String JavaDoc description = null;
46     private Map JavaDoc webServices = null;
47     private Map JavaDoc jmxBeans = null;
48     private Map JavaDoc beans = null;
49     
50     
51     /**
52      * Creates a new instance of DeploymentInfo
53      */

54     public DeploymentInfo() {
55         webServices = new HashMap JavaDoc();
56         jmxBeans = new HashMap JavaDoc();
57         beans = new HashMap JavaDoc();
58     }
59     
60     
61     /**
62      * This method returns the version information.
63      *
64      * @return The string containing the version information.
65      */

66     public String JavaDoc getVersion() {
67         return version;
68     }
69     
70     /**
71      * This method set the version information.
72      *
73      * @param version The version of the coadunation deployment
74      */

75     public void setVersion(String JavaDoc version) {
76         this.version = version;
77     }
78     
79     /**
80      * The getter method for the name information.
81      *
82      * @return The name of the deployment jar.
83      */

84     public String JavaDoc getName() {
85         return name;
86     }
87     
88     
89     /**
90      * Set the name of for the deployment jar.
91      *
92      * @param name The name of the deployment jar.
93      */

94     public void setName(String JavaDoc name) {
95         this.name = name;
96     }
97     
98     
99     /**
100      * The description for the deployment information.
101      *
102      * @return The string containing the description of the deployment
103      * information
104      */

105     public String JavaDoc getDescription() {
106         return description;
107     }
108     
109     
110     /**
111      * This method will set the description for this deployment object.
112      *
113      * @param description The new description for this deployment object.
114      */

115     public void setDescription(String JavaDoc description) {
116         this.description = description;
117     }
118     
119     /**
120      * Retrieve the list of web services.
121      *
122      * @return The list of web services.
123      */

124     public Map JavaDoc getWebServices() {
125         return webServices;
126     }
127     
128     
129     /**
130      * This method will add a new web service
131      *
132      * @param webServiceInfo The class containing the web service information
133      */

134     public void addWebService(WebServiceInfo webServiceInfo) {
135         webServices.put(webServiceInfo.getClassName(),webServiceInfo);
136     }
137     
138     /**
139      * Retrieve the list of means for the deployment.
140      *
141      * @return Return the list of jmx beans.
142      */

143     public Map JavaDoc getJmxBeans() {
144         return jmxBeans;
145     }
146     
147     /**
148      * This method will add a new JMX bean to the list of beans.
149      *
150      * @param beanInfo The bean info object.
151      */

152     public void addJmxBean(JMXBeanInfo jmxBeanInfo) {
153         jmxBeans.put(jmxBeanInfo.getClassName(),jmxBeanInfo);
154     }
155     
156     /**
157      * This method will return the list of beans.
158      */

159     public Map JavaDoc getBeans() {
160         return beans;
161     }
162     
163     /**
164      * This method will add a bean object to the list of bean object.
165      *
166      * @param beanInfo The information about a coadunation bean.
167      */

168     public void addBean(BeanInfo beanInfo) {
169         beans.put(beanInfo.getClassName(),beanInfo);
170     }
171 }
172
Popular Tags