Package com.rometools.rome.io.impl
Class PropertiesLoader
- java.lang.Object
-
- com.rometools.rome.io.impl.PropertiesLoader
-
public class PropertiesLoader extends Object
Properties loader that aggregates a master properties file and several extra properties files, all from the current classpath.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().
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PropertiesLoadergetPropertiesLoader()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.
-
-
-
Method Detail
-
getPropertiesLoader
public static PropertiesLoader getPropertiesLoader()
Returns the PropertiesLoader singleton used by ROME to load plugin components.- Returns:
- PropertiesLoader singleton.
-
getTokenizedProperty
public String[] getTokenizedProperty(String key, String separator)
Returns an array of tokenized values stored under a property key in all properties files. If the master file has this property its tokens will be the first ones in the array.- Parameters:
key- property key to retrieve valuesseparator- 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.
-
getProperty
public String[] getProperty(String key)
Returns an array of values stored under a property key in all properties files. If the master file has this property it will be the first ones in the array.- Parameters:
key- property key to retrieve values- Returns:
- all the values for the given property key from all the properties files.
-
-