1 |
|
//---PACKAGE DECLARATION--- |
2 |
< |
package uk.ac.ukc.iscream.componentmanger; |
2 |
> |
package uk.org.iscream.cms.server.componentmanager; |
3 |
|
|
4 |
|
//---IMPORTS--- |
5 |
< |
import uk.ac.ukc.iscream.core.*; |
5 |
> |
import uk.org.iscream.cms.server.core.*; |
6 |
|
import java.util.*; |
7 |
|
|
8 |
|
/** |
9 |
|
* ConfigurationCache class |
10 |
+ |
* This is essentially a wrapper and cache for |
11 |
+ |
* Configuration CORBA objects. The ConfigurationProxy creates an instance |
12 |
+ |
* of this class for every Configuration that is requested. This class then |
13 |
+ |
* hold the reference to the configuration, but also maintains a cache where |
14 |
+ |
* the ConfigurationProxy can store cached property values to safe on CORBA |
15 |
+ |
* requests. |
16 |
|
* |
17 |
|
* @author $Author$ |
18 |
|
* @version $Id$ |
33 |
|
/** |
34 |
|
* Construct a ConfigurationCache |
35 |
|
* |
36 |
+ |
* @param config a reference to the CORBA Configuration object this cache will hold |
37 |
+ |
* @param propertyCache a hashMap to hold cached properties |
38 |
|
*/ |
39 |
|
public ConfigurationCache(Configuration config, HashMap propertyCache) { |
40 |
|
_propertyCache = propertyCache; |
47 |
|
|
48 |
|
//---ACCESSOR/MUTATOR METHODS--- |
49 |
|
|
50 |
+ |
/** |
51 |
+ |
* Obtins the hash containing cached |
52 |
+ |
* configuration property values. |
53 |
+ |
* |
54 |
+ |
* @return the property cache |
55 |
+ |
*/ |
56 |
|
public HashMap getPropertyCache() { |
57 |
|
return _propertyCache; |
58 |
|
} |
59 |
|
|
60 |
+ |
/** |
61 |
+ |
* Obtains the reference to the |
62 |
+ |
* CORBA configuration object this |
63 |
+ |
* cache holds. |
64 |
+ |
* |
65 |
+ |
* @return the configuration object |
66 |
+ |
*/ |
67 |
|
public Configuration getConfig() { |
68 |
|
return _config; |
69 |
|
} |
70 |
|
|
71 |
+ |
/** |
72 |
+ |
* Sets this cache to hold a new CORBA |
73 |
+ |
* Configuration object. |
74 |
+ |
* |
75 |
+ |
* @param config the new CORBA Configuration object |
76 |
+ |
*/ |
77 |
|
public void setConfig(Configuration config) { |
78 |
|
_config = config; |
79 |
|
} |
80 |
|
|
81 |
+ |
/** |
82 |
+ |
* Sets this cache to hold a new property |
83 |
+ |
* cache. |
84 |
+ |
* |
85 |
+ |
* @param propertyCache the new hash map to containing a property cache |
86 |
+ |
*/ |
87 |
|
public void setPropertyCache(HashMap propertyCache) { |
88 |
|
_propertyCache = propertyCache; |
89 |
|
} |
90 |
|
|
91 |
|
//---ATTRIBUTES--- |
92 |
|
|
93 |
+ |
/** |
94 |
+ |
* A hash that contains cached property values |
95 |
+ |
*/ |
96 |
|
private HashMap _propertyCache; |
97 |
+ |
|
98 |
+ |
/** |
99 |
+ |
* The Configuration this configuration cache looks after |
100 |
+ |
*/ |
101 |
|
private Configuration _config; |
102 |
|
|
103 |
|
//---STATIC ATTRIBUTES--- |