1 /*
2 Copyright (C) 2000 - 2007 Grid Systems, S.A.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License, version 2, as
6 published by the Free Software Foundation.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 */
17
18 package com.gridsystems.innergrid.kernel.services;
19
20 /**
21 * Bean containing plug-in data.
22 * Plug-in is the internal name for Grid Service.
23 *
24 * @author Rodrigo Ruiz
25 * @version 1.0
26 */
27 public class PluginInfo {
28
29 /**
30 * Constant to set the log level to DEBUG (writes all log messages).
31 */
32 public static final String LOG_DEBUG = "DEBUG";
33
34 /**
35 * Constant to set the log level to INFO.
36 *
37 * The INFO level writes messages that explain the process of the system,
38 * but with less detail than at the DEBUG level.
39 */
40 public static final String LOG_INFO = "INFO";
41
42 /**
43 * Constant to set the log level to WARN.
44 *
45 * The WARN level only writes messages that show that the Server has found
46 * a condition that is, at least, not very usual and that should be checked.
47 */
48 public static final String LOG_WARN = "WARN";
49
50 /**
51 * Constant to set the log level to ERROR.
52 *
53 * The ERROR level only writes messages that show that the Server has found
54 * an error that has affected the usual behavior of the
55 * Server.
56 */
57 public static final String LOG_ERROR = "ERROR";
58
59 /**
60 * Constant to set the log level to FATAL.
61 *
62 * The FATAL level only writes messages that show that the Server has found
63 * a condition that is a serious error which could shut down the
64 * Server or to leave it in an unstable state.
65 */
66 public static final String LOG_FATAL = "FATAL";
67
68 /** The plug-in name. */
69 private String name;
70
71 /** The plug-in description. */
72 private String description;
73
74 /** The plug-in copyright text. */
75 private String copyright;
76
77 /** The plug-in version. */
78 private VersionInfo version;
79
80 /** Contains license data. */
81 private LicenseField[] licenseFields;
82
83 /** The plug-in current log level. */
84 private String logLevel;
85
86 /**
87 * Default empty constructor.
88 */
89 public PluginInfo() { }
90
91 /**
92 * Gets the copyright text of this plug-in.
93 *
94 * @return the plug-in copyright text.
95 */
96 public String getCopyright() {
97 return copyright;
98 }
99
100 /**
101 * Gets a short description of this plug-in.
102 *
103 * @return a short description of the plug-in.
104 */
105 public String getDescription() {
106 return description;
107 }
108
109 /**
110 * Gets the current log level of this plug-in.
111 *
112 * @return the plug-in log level.
113 */
114 public String getLogLevel() {
115 return logLevel;
116 }
117
118 /**
119 * Gets the public name of this plug-in.
120 *
121 * @return the public name.
122 */
123 public String getName() {
124 return name;
125 }
126
127 /**
128 * Gets the version data of this plug-in.
129 *
130 * @return the version data.
131 */
132 public VersionInfo getVersion() {
133 return version;
134 }
135
136 /**
137 * Sets the Copyright text of this plug-in.
138 *
139 * @param copyright the new Copyright text
140 */
141 public void setCopyright(String copyright) {
142 this.copyright = copyright;
143 }
144
145 /**
146 * Sets the description of this plug-in.
147 *
148 * @param description the new plug-in description
149 */
150 public void setDescription(String description) {
151 this.description = description;
152 }
153
154 /**
155 * Sets the log level of this plug-in.
156 *
157 * @param level the new plug-in log level
158 */
159 public void setLogLevel(String level) {
160 this.logLevel = level;
161 }
162
163 /**
164 * Sets the name of this plug-in.
165 *
166 * @param name the new plug-in name
167 */
168 public void setName(String name) {
169 this.name = name;
170 }
171
172 /**
173 * Sets the public version data of this plug-in.
174 *
175 * @param version the new version data
176 */
177 public void setVersion(VersionInfo version) {
178 this.version = version;
179 }
180
181 /**
182 * Gets the license fields for this plug-in.
183 * These fields display plug-in limitations or restrictions such as
184 * expiration date, maximum number of users or machines, etc.
185 *
186 * @return the license fields.
187 */
188 public LicenseField[] getLicenseFields() {
189 return this.licenseFields;
190 }
191
192 /**
193 * Sets the license fields for this plug-in.
194 * These fields display plug-in limitations or restrictions such as
195 * expiration date, maximum number of users or machines, etc.
196 *
197 * @param licenseFields the new license fields
198 */
199 public void setLicenseFields(LicenseField[] licenseFields) {
200 this.licenseFields = licenseFields;
201 }
202 }