ConfigStorage.java [src/java/d/util] Revision: default Date:
/*
* $Id$
*
* This file is part of the Cloud Services Integration Platform (CSIP),
* a Model-as-a-Service framework, API, and application suite.
*
* 2012-2017, OMSLab, Colorado State University.
*
* OMSLab licenses this file to you under the MIT license.
* See the LICENSE file in the project root for more information.
*/
package d.util;
import java.util.HashMap;
import java.util.Map;
/**
*
* @author brad
*/
public class ConfigStorage {
protected Map<String, String> c_data;
public void set(String propertyName, String value) {
if (c_data == null) {
// There was code about loading a config file but I want default always for now
c_data = new HashMap<>();
}
c_data.put(propertyName, value);
}
public String get(String propertyName) {
synchronized (this) {
if (c_data == null) {
// There was code about loading a config file but I want default always for now
c_data = new HashMap<>();
}
}
return c_data.get(propertyName);
}
}