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 aReportConfiguration
with default values.Returns theModifiableReportConfiguration
to use for this project.loadConfigurationFromExternalPropertiesFile
(String propertiesFilePath) Returns aReportConfiguration
with the values defined in the specified leanft.properties file.loadConfigurationFromResources
(String propertiesFileName) Returns aReportConfiguration
with the values defined in the leanft.properties file located in the resources folder.
-
Constructor Details
-
ReportConfigurationFactory
public ReportConfigurationFactory()
-
-
Method Details
-
createDefaultReportConfiguration
Returns aReportConfiguration
with default values.- Returns:
- ReportConfiguration with default values.
-
loadConfigurationFromResources
public static ModifiableReportConfiguration loadConfigurationFromResources(String propertiesFileName) throws IOException Returns aReportConfiguration
with 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
ReportConfiguration
with 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 aReportConfiguration
with 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
ReportConfiguration
with the values from the specified properties file. - Throws:
IOException
- if the file is not found.
-
getReportConfiguration
Returns theModifiableReportConfiguration
to 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
-