public class PropertyManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static org.apache.logging.log4j.Logger |
LOGGER |
private java.util.Properties |
serverProperties |
private java.io.File |
serverPropertiesFile |
Constructor and Description |
---|
PropertyManager(java.io.File propertiesFile) |
Modifier and Type | Method and Description |
---|---|
void |
generateNewProperties() |
boolean |
getBooleanProperty(java.lang.String key,
boolean defaultValue) |
int |
getIntProperty(java.lang.String key,
int defaultValue) |
long |
getLongProperty(java.lang.String key,
long defaultValue) |
java.io.File |
getPropertiesFile() |
java.lang.String |
getStringProperty(java.lang.String key,
java.lang.String defaultValue) |
boolean |
hasProperty(java.lang.String key) |
void |
removeProperty(java.lang.String key) |
void |
saveProperties() |
void |
setProperty(java.lang.String key,
java.lang.Object value) |
private static final org.apache.logging.log4j.Logger LOGGER
private final java.util.Properties serverProperties
private final java.io.File serverPropertiesFile
public void generateNewProperties()
public void saveProperties()
public java.io.File getPropertiesFile()
public java.lang.String getStringProperty(java.lang.String key, java.lang.String defaultValue)
public int getIntProperty(java.lang.String key, int defaultValue)
public long getLongProperty(java.lang.String key, long defaultValue)
public boolean getBooleanProperty(java.lang.String key, boolean defaultValue)
public void setProperty(java.lang.String key, java.lang.Object value)
public boolean hasProperty(java.lang.String key)
public void removeProperty(java.lang.String key)