com.sun.syndication.io.impl
public class PropertiesLoader extends Object
The master properties file has to be in a distinct location than the extra properties files. First the master properties file is loaded, then all the extra properties files in their order of appearance in the classpath.
Current use cases (plugin manager for parsers/converters/generators for feeds and modules and date formats) assume properties are list of tokens, that why the only method to get property values is the getTokenizedProperty().
Field Summary | |
---|---|
static String | EXTRA_PLUGIN_FILE |
static String | MASTER_PLUGIN_FILE |
static PropertiesLoader | PROPERTIES_LOADER |
Properties[] | _properties |
Constructor Summary | |
---|---|
PropertiesLoader(String masterFileLocation, String extraFileLocation)
Creates a PropertiesLoader.
|
Method Summary | |
---|---|
static PropertiesLoader | getPropertiesLoader()
Returns the PropertiesLoader singleton used by ROME to load plugin components.
|
String[] | getProperty(String key)
Returns an array of values stored under a property key in all properties files.
|
String[] | getTokenizedProperty(String key, String separator)
Returns an array of tokenized values stored under a property key in all properties files.
|
Parameters: masterFileLocation master file location, there must be only one. extraFileLocation extra file location, there may be many.
Throws: IOException thrown if one of the properties file could not be read.
Returns: PropertiesLoader singleton.
Parameters: key property key to retrieve values
Returns: all the values for the given property key from all the properties files.
Parameters: key property key to retrieve values separator String with all separator characters to tokenize from the values in all properties files.
Returns: all the tokens for the given property key from all the properties files.