KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sape > carbon > core > config > PropertyConfiguration


1 /*
2  * The contents of this file are subject to the Sapient Public License
3  * Version 1.0 (the "License"); you may not use this file except in compliance
4  * with the License. You may obtain a copy of the License at
5  * http://carbon.sf.net/License.html.
6  *
7  * Software distributed under the License is distributed on an "AS IS" basis,
8  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
9  * the specific language governing rights and limitations under the License.
10  *
11  * The Original Code is The Carbon Component Framework.
12  *
13  * The Initial Developer of the Original Code is Sapient Corporation
14  *
15  * Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
16  */

17
18 package org.sape.carbon.core.config;
19
20 import java.util.Date JavaDoc;
21
22 /**
23  * <P>This is the base interface for buisiness Configuration objects.
24  * This type of configuration should be used to define configurations that are
25  * not interfaced through a strongly-typed Java interface. This type of
26  * configuration is often used for generic data and information that is not
27  * connected to a specific business entity.</P>
28  *
29  * Copyright 2002 Sapient
30  * @since carbon 1.0
31  * @author Greg Hinkle, January 2002
32  * @version $Revision: 1.7 $($Author: dvoet $ / $Date: 2003/05/05 21:21:16 $)
33  */

34 public interface PropertyConfiguration extends Configuration {
35
36     /**
37      * Retrieves a string property configuration
38      * @param propertyName a dot ('.') delimeted path/key to the requested
39      * configuration value
40      * @return the string value of the configuration
41      */

42     String JavaDoc getProperty(String JavaDoc propertyName);
43     /**
44      * Retrieves a string property configuration or returns the
45      * supplied default if none is found.
46      * @param propertyName a dot ('.') delimeted path/key to the requested
47      * configuration value
48      * @param defaultValue the value to be returned if not configured
49      * @return the requested configuration value or the default
50      */

51     String JavaDoc getProperty(String JavaDoc propertyName, String JavaDoc defaultValue);
52     /**
53      * Sets the property named by propertyName to the value specified by value
54      * as a String
55      * @param propertyName a dot ('.') delimeted path/key to the requested
56      * configuration value
57      * @param value the new value
58      */

59     void setProperty(String JavaDoc propertyName, String JavaDoc value);
60
61     /**
62      * Retrieves an array of string values that are retrieved from
63      * the configuration document at the supplied key. These values should be
64      * seperated by commas (',').
65      * If no values are in the configuration, a 0 length array is returned.
66      *
67      * @param propertyName a dot ('.') delimeted path/key to the requested
68      * configuration value
69      * @return the array of values
70      */

71     String JavaDoc[] getCSVProperty(String JavaDoc propertyName);
72     /**
73      * Sets the property named by propertyName to the value specified by value
74      * as a comma separated list of strings
75      * @param propertyName a dot ('.') delimeted path/key to the requested
76      * configuration value
77      * @param values array of the new values that will be serialized, separated
78      * by commas
79      */

80     void setCSVProperty(String JavaDoc propertyName, String JavaDoc[] values);
81
82     /**
83      * Retrieves an array of string values that are retrieved from
84      * the configuration document at the supplied key. These values should be
85      * seperated by white-space of any kind including spaces tabs or newlines.
86      * If no values are in the configuration, a 0 length array is returned.
87      *
88      * @param propertyName a dot ('.') delimeted path/key to the requested
89      * configuration value
90      * @return the array of values
91      */

92     String JavaDoc[] getWSVProperty(String JavaDoc propertyName);
93     /**
94      * Sets the property named by propertyName to the value specified by value
95      * as a white-space separated list of strings
96      * @param propertyName a dot ('.') delimeted path/key to the requested
97      * configuration value
98      * @param values array of the new values that will be serialized, separated
99      * by spaces.
100      */

101     void setWSVProperty(String JavaDoc propertyName, String JavaDoc[] values);
102
103     /**
104      * Retrieves a configured byte property.
105      * @param propertyName a dot ('.') delimeted path/key to the requested
106      * configuration value
107      * @return the configured byte
108      */

109     byte getByteProperty(String JavaDoc propertyName);
110
111     /**
112      * Retrieves a configured byte property.
113      * @param propertyName a dot ('.') delimeted path/key to the requested
114      * configuration value
115      * @param defaultValue the byte to be returned if none is configured
116      * @return the configured byte
117      */

118     byte getByteProperty(String JavaDoc propertyName, byte defaultValue);
119     /**
120      * Sets the property named by propertyName to the value specified by value
121      * as a byte
122      * @param propertyName a dot ('.') delimeted path/key to the requested
123      * configuration value
124      * @param value the new value
125      */

126     void setByteProperty(String JavaDoc propertyName, byte value);
127
128     /**
129      * Retrieves a configured boolean values
130      * @param propertyName a dot ('.') delimeted path/key to the requested
131      * configuration value
132      * @return retrieves a configured boolean
133      */

134     boolean getBooleanProperty(String JavaDoc propertyName);
135
136     /**
137      * Retrieves a configured boolean values
138      *
139      * @return retrieves a configured boolean
140      * @param defaultValue the default boolean to be returned if
141      * none is configured
142      * @param propertyName a dot ('.') delimeted path/key to the requested
143      * configuration value
144      */

145     boolean getBooleanProperty(String JavaDoc propertyName, boolean defaultValue);
146     /**
147      * Sets the property named by propertyName to the value specified by value
148      * as a boolean
149      * @param propertyName a dot ('.') delimeted path/key to the requested
150      * configuration value
151      * @param value the new value
152      */

153     void setBooleanProperty(String JavaDoc propertyName, boolean value);
154
155     /**
156      * Retrieves a configured short value
157      * @param propertyName a dot ('.') delimeted path/key to the requested
158      * configuration value
159      * @return the configured short value
160      */

161     short getShortProperty(String JavaDoc propertyName);
162
163     /**
164      * Retrieves a configured short values
165      * @return the configured short
166      * @param defaultValue the default short to be returned if
167      * none is configured
168      * @param propertyName a dot ('.') delimeted path/key to the requested
169      * configuration value
170      */

171     short getShortProperty(String JavaDoc propertyName, short defaultValue);
172     /**
173      * Sets the property named by propertyName to the value specified by value
174      * as a short
175      * @param propertyName a dot ('.') delimeted path/key to the requested
176      * configuration value
177      * @param value the new value
178      */

179     void setShortProperty(String JavaDoc propertyName, short value);
180
181     /**
182      * Retrieves a configured int value
183      * @param propertyName a dot ('.') delimeted path/key to the requested
184      * configuration value
185      * @return the configured int property
186      */

187     int getIntProperty(String JavaDoc propertyName);
188
189     /**
190      * Retrieves a configured int values
191      * @return retrieves a configured int
192      * @param defaultValue the default int to be returned if none is configured
193      * @param propertyName a dot ('.') delimeted path/key to the requested
194      * configuration value
195      */

196     int getIntProperty(String JavaDoc propertyName, int defaultValue);
197     /**
198      * Sets the property named by propertyName to the value specified by value
199      * as a int
200      * @param propertyName a dot ('.') delimeted path/key to the requested
201      * configuration value
202      * @param value the new value
203      */

204     void setIntProperty(String JavaDoc propertyName, int value);
205
206     /**
207      * Retrieves a configured long property.
208      * @param propertyName a dot ('.') delimeted path/key to the requested
209      * configuration value
210      * @return the configured long property
211      */

212     long getLongProperty(String JavaDoc propertyName);
213
214     /**
215      * Retrieves a configured long values
216      * @return retrieves a configured long
217      * @param defaultValue the default long to be returned if none is configured
218      * @param propertyName a dot ('.') delimeted path/key to the requested
219      * configuration value
220      */

221     long getLongProperty(String JavaDoc propertyName, long defaultValue);
222     /**
223      * Sets the property named by propertyName to the value specified by value
224      * as a long
225      * @param propertyName a dot ('.') delimeted path/key to the requested
226      * configuration value
227      * @param value the new value
228      */

229     void setLongProperty(String JavaDoc propertyName, long value);
230
231     /**
232      * Retrieves a configured float value.
233      * @param propertyName a dot ('.') delimeted path/key to the requested
234      * configuration value
235      * @return the configured float value.
236      */

237     float getFloatProperty(String JavaDoc propertyName);
238
239     /**
240      * Retrieves a configured float values
241      * @return retrieves a configured float
242      * @param defaultValue the default float to be returned if
243      * none is configured
244      * @param propertyName a dot ('.') delimeted path/key to the requested
245      * configuration value
246      */

247     float getFloatProperty(String JavaDoc propertyName, float defaultValue);
248
249     /**
250      * Sets the property named by propertyName to the value specified by value
251      * as a float
252      * @param propertyName a dot ('.') delimeted path/key to the requested
253      * configuration value
254      * @param value the new value
255      */

256     void setFloatProperty(String JavaDoc propertyName, float value);
257
258     /**
259      * Retrieves a configured double value
260      * @param propertyName a dot ('.') delimeted path/key to the requested
261      * configuration value
262      * @return the configured double value
263      */

264     double getDoubleProperty(String JavaDoc propertyName);
265
266     /**
267      * Retrieves a configured double values
268      *
269      * @return retrieves a configured double
270      * @param defaultValue the default double to be returned if
271      * none is configured
272      * @param propertyName a dot ('.') delimeted path/key to the requested
273      * configuration value
274      */

275     double getDoubleProperty(String JavaDoc propertyName, double defaultValue);
276     /**
277      * Sets the property named by propertyName to the value specified by value
278      * as a double
279      * @param propertyName a dot ('.') delimeted path/key to the requested
280      * configuration value
281      * @param value the new value
282      */

283     void setDoubleProperty(String JavaDoc propertyName, double value);
284
285     /**
286      * Retrieves a configured class object
287      * @param propertyName a dot ('.') delimeted path/key to the requested
288      * configuration value
289      * @return retrieves the configured class object
290      */

291     Class JavaDoc getClassProperty(String JavaDoc propertyName);
292
293     /**
294      * Retrieves a configured Class values
295      *
296      * @return retrieves a configured class object
297      * @param defaultValue a fully qualified class name to be
298      * returned if none is configured
299      * @param propertyName a dot ('.') delimeted path/key to the requested
300      * configuration value
301      */

302     Class JavaDoc getClassProperty(String JavaDoc propertyName, Class JavaDoc defaultValue);
303
304     /**
305      * Sets the property named by propertyName to the value specified by value
306      *
307      * as a Class
308      * @param propertyName a dot ('.') delimeted path/key to the requested
309      * configuration value
310      * @param value the new value
311      */

312     void setClassProperty(String JavaDoc propertyName, Class JavaDoc value);
313
314     /**
315      * Retrieves a configured class object
316      *
317      * @param propertyName a dot ('.') delimeted path/key to the requested
318      * configuration value
319      * @return retrieves the configured class object
320      */

321     Date JavaDoc getDateProperty(String JavaDoc propertyName);
322
323     /**
324      * Retrieves a configured Class values
325      *
326      * @return retrieves a configured class object
327      * @param defaultValue a fully qualified class name to be returned
328      * if none is configured
329      * @param propertyName a dot ('.') delimeted path/key to the requested
330      * configuration value
331      */

332     Date JavaDoc getDateProperty(String JavaDoc propertyName, Date JavaDoc defaultValue);
333
334     /**
335      * Sets the property named by propertyName to the value specified by value
336      * as a Class
337      *
338      * @param propertyName a dot ('.') delimeted path/key to the requested
339      * configuration value
340      * @param value the new value
341      */

342     void setDateProperty(String JavaDoc propertyName, Date JavaDoc value);
343
344 }
345
Popular Tags