Created
March 29, 2011 13:42
-
-
Save shooley/892377 to your computer and use it in GitHub Desktop.
Commons Configuration Property Manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.commons.configuration.CombinedConfiguration; | |
public class PropertyManager { | |
private String YOUR_PROPERTY_FILE = "properties.xml"; | |
private static CombinedConfiguration combinedConfiguration = | |
CommonsConfigurationUtility | |
.createConfiguration(YOUR_PROPERTY_FILE); | |
private PropertyManager() { } | |
public getProperty(String key) { | |
return combinedConfiguration.getString(key); | |
} | |
public getPropertyList(String propertyList) { | |
return combinedConfiguration.getStringArray(propertyName); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment