Package yearreview.app.config
Class ConfigParser
java.lang.Object
yearreview.app.config.ConfigParser
Parser for the command line arguments and the configuration file.
- Author:
- ColdStone37
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConfigParser
(String[] args) Constructs a ConfigParser and parses the arguments and config file. -
Method Summary
Modifier and TypeMethodDescriptionGets the configuration for the data sources.private static org.apache.commons.cli.Options
Gets the Command line options.Gets the configuration for thewidgets
.private void
parseConfigFile
(String file) Parses the configuration file specified in the command line arguments.private void
parseSettings
(XmlNode settings) Parses the settings part of the configuration file.
-
Field Details
-
XML_VERSION
Version of the configuration.- See Also:
-
widgets
Configuration for the widgets. -
dataSources
Configuration for the data sources. -
logger
-
-
Constructor Details
-
ConfigParser
Constructs a ConfigParser and parses the arguments and config file.- Parameters:
args
- command line arguments
-
-
Method Details
-
getOptions
private static org.apache.commons.cli.Options getOptions()Gets the Command line options.- Returns:
- options with descriptions
-
parseConfigFile
Parses the configuration file specified in the command line arguments.- Parameters:
file
- configuration file to parse
-
getWidgetSettings
Gets the configuration for thewidgets
.- Returns:
- configuration
-
getDataSourcesSettings
Gets the configuration for the data sources.- Returns:
- configuration
-
parseSettings
Parses the settings part of the configuration file.- Parameters:
settings
- configuration node containing the settings
-