Package com.hp.lft.report
Class ReportConfigurationFactory
java.lang.Object
com.hp.lft.report.ReportConfigurationFactory
Interface for creating a configuration that overrides the default report behavior or extends its capabilities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns aReportConfigurationwith default values.Returns theModifiableReportConfigurationto use for this project.loadConfigurationFromExternalPropertiesFile(String propertiesFilePath) Returns aReportConfigurationwith the values defined in the specified leanft.properties file.loadConfigurationFromResources(String propertiesFileName) Returns aReportConfigurationwith the values defined in the leanft.properties file located in the resources folder.
-
Constructor Details
-
ReportConfigurationFactory
public ReportConfigurationFactory()
-
-
Method Details
-
createDefaultReportConfiguration
Returns aReportConfigurationwith default values.- Returns:
- ReportConfiguration with default values.
-
loadConfigurationFromResources
public static ModifiableReportConfiguration loadConfigurationFromResources(String propertiesFileName) throws IOException Returns aReportConfigurationwith the values defined in the leanft.properties file located in the resources folder. If a value is missing in the specified property file, it is initialized in the returned configuration with the default value.- Parameters:
propertiesFileName- the name of the properties file to load (the file must be in the resources folder).- Returns:
- the
ReportConfigurationwith the values from the specified properties file. - Throws:
IOException- if the file is not found.
-
loadConfigurationFromExternalPropertiesFile
public static ModifiableReportConfiguration loadConfigurationFromExternalPropertiesFile(String propertiesFilePath) throws IOException Returns aReportConfigurationwith the values defined in the specified leanft.properties file. If a value is missing in the specified property file, it is initialized in the returned configuration with the default value.- Parameters:
propertiesFilePath- the full path of the properties file to load.- Returns:
- the
ReportConfigurationwith the values from the specified properties file. - Throws:
IOException- if the file is not found.
-
getReportConfiguration
Returns theModifiableReportConfigurationto use for this project. By default, uses the Report configuration details defined in the project's leanft.properties file.
However, if an 'lftConfigFile' system variable was specified with a valid leanft.properties file, the Report data from that file is used to initialize theSDKConfiguration.- Returns:
- the ModifiableReportConfiguration to use for this project
- Throws:
IOException
-