com.ch.utils.PropertyCache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ch-java-sdk Show documentation
Show all versions of ch-java-sdk Show documentation
The Charles Hudson Java SDK wraps the REST API in a lightweight library.
The Java SDK enables you to develop a fast, flexible, and customized integration with CH cloud solution.
package com.ch.utils;
import com.ch.exception.PropertyNotFoundException;
public final class PropertyCache extends PropertyReader {
public static String getProperty(String key) throws PropertyNotFoundException {
if(properties.containsKey(key)) {
return PropertyReader.properties.getProperty(key);
} else {
throw new PropertyNotFoundException(" Property " + key + " not found");
}
}
public static Object getPropertyObject(String key) throws PropertyNotFoundException {
if(properties.containsKey(key)) {
return PropertyReader.properties.getProperty(key);
} else {
throw new PropertyNotFoundException(" Property " + key + " not found");
}
}
}