@@ -0,0 +1,1606 @@
+package org.bartelby.configuration;%0A%0Aimport java.util.concurrent.ConcurrentHashMap;%0A%0A/**%0A * Security configuration.%0A * %0A * Give security configuration access%0A * from global application scope.%0A * %0A * @author vallance%0A *%0A */%0Apublic class ConfigurationSecurity %7B%0A%0A%09/**%0A%09 * mapped values.%0A%09 * %0A%09 * Security configuration value storage%0A%09 * with thread safe implementation.%0A%09 */%0A%09private static ConcurrentHashMap%3CString, Object%3E mappedValues = new ConcurrentHashMap%3CString, Object%3E();%0A%09%0A%09/**%0A%09 * Default controller.%0A%09 * %0A%09 * Default constructor with parent constructor calling.%0A%09 */%0A%09public ConfigurationSecurity() %7B%0A%09%09super();%0A%09%7D%0A%09%0A%09/**%0A%09 * Key exist.%0A%09 * %0A%09 * Return true if the given key exist in the security%0A%09 * value storage map.%0A%09 * %0A%09 * @param key%09the key to test.%0A%09 * @return%09%09true if the key exist or false.%0A%09 */%0A%09static public boolean exist(Object key) %7B%0A%09%09return ConfigurationSecurity.mappedValues.containsKey(key);%0A%09%7D%0A%09%0A%09/**%0A%09 * Put value.%0A%09 * %0A%09 * Put a new key/value into the security storage.%0A%09 * %0A%09 * @param key%09%09The key to create or update.%0A%09 * @param value%09%09The value to insert.%0A%09 */%0A%09static public void put(String key, Object value) %7B%0A%09%09ConfigurationSecurity.mappedValues.put(key, value);%0A%09%7D%0A%09%0A%09/**%0A%09 * Get a value.%0A%09 * %0A%09 * Return a previously stored value from a given key.%0A%09 * %0A%09 * @param key%09The key to return the value.%0A%09 * @return%09%09The value of the given key or null if the key doesn't exist.%0A%09 */%0A%09static public Object get(String key)%7B%0A%09%09if(ConfigurationSecurity.mappedValues.containsKey(key))%7B%0A%09%09%09return ConfigurationSecurity.mappedValues.get(key);%0A%09%09%7Delse%7B%0A%09%09%09return null;%0A%09%09%7D%0A%09%7D%0A%0A%7D%0A

Create security static configurator