KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > blandware > atleap > service > core > GlobalPropertyManager


1 /*
2  * Copyright 2004 Blandware (http://www.blandware.com)
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package com.blandware.atleap.service.core;
17
18 import com.blandware.atleap.model.core.GlobalProperty;
19 import com.blandware.atleap.service.exception.BeanNotFoundException;
20
21 import java.util.List JavaDoc;
22 import java.util.Properties JavaDoc;
23
24 /**
25  * <p>Business Delegate (Proxy) Interface to handle communication between web and
26  * persistence layer.
27  * </p>
28  * <p>
29  * All global properties are divided into 2 classes: <em>static</em> and <em>dynamic</em> properties.
30  * Static properties are defined in configuration files and cannot be changed
31  * from the application. Dynamic properties are defined in configuration files
32  * too, but they can be overrided by the user in the application. So their values
33  * in configuration files are just initial values.
34  * </p>
35  * <p><a HREF="GlobalPropertyManager.java.htm"><i>View Source</i></a>
36  * </p>
37  *
38  * @author Sergey Zubtcovskii <a HREF="mailto:sergey.zubtcovskii@blandware.com">&lt;sergey.zubtcovskii@blandware.com&gt;</a>
39  * @author Andrey Grebnev <a HREF="mailto:andrey.grebnev@blandware.com">&lt;andrey.grebnev@blandware.com&gt;</a>
40  * @version $Revision: 1.9 $ $Date: 2006/03/16 11:09:38 $
41  */

42 public interface GlobalPropertyManager extends BaseManager {
43
44
45     /**
46      * Loads dynamic properties. Those properties that do not exist more are
47      * deleted from the persistent storage. This can also 'roll back' values of
48      * properties in persistent storage to those that are in configuration files.
49      *
50      * @param overrideDynamicValues Whether or not to replace dynamically changed values with ones from configuration file
51      * @return dynamic properties
52      */

53     public Properties JavaDoc loadDynamicProperties(boolean overrideDynamicValues);
54
55     /**
56      * Retrieves global property object with specified name
57      *
58      * @param propertyName Name of propery to retrieve
59      * @return Global property object or null if none was found
60      */

61     public GlobalProperty retrieveGlobalProperty(String JavaDoc propertyName);
62
63     /**
64      * Returns static properties
65      * @return Static properties
66      */

67     public Properties JavaDoc getStaticProperties();
68
69     /**
70      * Updates global property
71      *
72      * @param globalProperty Property to update
73      * @throws BeanNotFoundException if some property couldn't be found
74      */

75     public void updateProperty(GlobalProperty globalProperty) throws BeanNotFoundException;
76
77     // ~ Additional methods ================================================================
78

79     /**
80      * Retrieves list of dynamic global properties.
81      *
82      * @return List of dynamic global properties
83      */

84     public List JavaDoc listDynamicProperties();
85
86 }
Popular Tags