net.sourceforge.argval.utils
Interface PropertiesLoader

All Known Implementing Classes:
PropertiesLoaderImpl

public interface PropertiesLoader

A PropertiesLoader does provides a standard way for loading configuration(s), as Properties.

Author:
T. Verhagen
See Also:
PropertiesLoaderImpl

Method Summary
 File getPropertiesFile()
          Returns the location of the properties file.
 String getPropertiesFileMessage()
          Returns a message about the location from which the message was loaded.
 Properties loadConfiguration()
          Returns the loaded configuration Properties, including the System.getProperties().
 Properties loadConfiguration(Boolean includeSystemProperties)
          Load the configuration properties from file and add the System properties (environment variable).
 

Method Detail

loadConfiguration

Properties loadConfiguration()
                             throws FileNotFoundException,
                                    IOException
Returns the loaded configuration Properties, including the System.getProperties().

Returns:
The loaded Properties.
Throws:
FileNotFoundException - When no configuration file is found.
IOException - When loading of properties file is not successful.

loadConfiguration

Properties loadConfiguration(Boolean includeSystemProperties)
                             throws FileNotFoundException,
                                    IOException
Load the configuration properties from file and add the System properties (environment variable). Or explicitly instruct not to add the system properties.

Parameters:
includeSystemProperties - - If true the system properties will be included (over ruling the loaded properties from file), else (when false) the system properties will not added. (Default is true)
Returns:
The loaded Properties.
Throws:
FileNotFoundException - When no configuration file is found.
IOException - When loading of properties file is not successful.

getPropertiesFile

File getPropertiesFile()
                       throws FileNotFoundException
Returns the location of the properties file.

Returns:
The location of the properties file.
Throws:
FileNotFoundException - When no configuration file is found.

getPropertiesFileMessage

String getPropertiesFileMessage()
Returns a message about the location from which the message was loaded.

Returns:
A message about the location from which the message was loaded.


Copyright © 2013 Verhagen Software. All Rights Reserved.