Property Manager
Since Kernel 2.0.5, there is a registry for global configuration. It is actually a facade in front of system properties and has been added for several reasons:- It manages a cache of the system properties, indeed system properties are expensive to retrieve as it involves security check and a synchronized map.
- In future versions it could be extended to take configuration from some other place.
- In future versions it will contain privileged code block in order to make exo products executable under a java security manager.
package org.exoplatform.commons.utils; public class PropertyManager { public static String getProperty(String propertyName) { ... } public static void setProperty(String propertyName, String propertyValue) { ... } public static boolean isDevelopping() { ... } public synchronized static boolean getUseCache() { ... } public synchronized static void refresh() { ... } }
on 07/05/2009 at 16:29