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().
| Modifier and Type | Field and Description |
|---|---|
| private static Map | |
| private static final String | |
| private static final String | |
| private final Properties[] |
| Access | Constructor and Description |
|---|---|
| private | PropertiesLoader(final String
master file location, there must be only one. masterFileLocation, final String extra file location, there may be many. extraFileLocation)Creates a PropertiesLoader. |
| Modifier and Type | Method and Description |
|---|---|
| public static PropertiesLoader | Returns: PropertiesLoader singleton.Returns the PropertiesLoader singleton used by ROME to load plugin components. |
| public String[] | Returns: all the values for the given property key from all the properties files.property key to retrieve values key)Returns an array of values stored under a property key in all properties files. |
| public String[] | Returns: all the tokens for the given property key from all the properties files.property key to retrieve values key, final String String with all separator characters to tokenize from the
values in all properties files. separator)Returns an array of tokenized values stored under a property key in all properties files. |
| clMap | back to summary |
|---|---|
| private static Map<ClassLoader, PropertiesLoader> clMap | |
| EXTRA_PLUGIN_FILE | back to summary |
|---|---|
| private static final String EXTRA_PLUGIN_FILE | |
| MASTER_PLUGIN_FILE | back to summary |
|---|---|
| private static final String MASTER_PLUGIN_FILE | |
| properties | back to summary |
|---|---|
| private final Properties[] properties | |
| PropertiesLoader | back to summary |
|---|---|
| private PropertiesLoader(final String masterFileLocation, final String extraFileLocation) throws IOException Creates a PropertiesLoader.
| |
| getPropertiesLoader | back to summary |
|---|---|
| public static PropertiesLoader getPropertiesLoader() Returns the PropertiesLoader singleton used by ROME to load plugin components.
| |
| getProperty | back to summary |
|---|---|
| public String[] getProperty(final 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.
| |
| getTokenizedProperty | back to summary |
|---|---|
| public String[] getTokenizedProperty(final String key, final 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.
| |