Class ReportConfigurationFactory

java.lang.Object
com.hp.lft.report.ReportConfigurationFactory

public class ReportConfigurationFactory extends Object
Interface for creating a configuration that overrides the default report behavior or extends its capabilities.
  • Constructor Details

    • ReportConfigurationFactory

      public ReportConfigurationFactory()
  • Method Details

    • createDefaultReportConfiguration

      public static ModifiableReportConfiguration createDefaultReportConfiguration()
      Returns a ReportConfiguration with default values.
      Returns:
      ReportConfiguration with default values.
    • loadConfigurationFromResources

      public static ModifiableReportConfiguration loadConfigurationFromResources(String propertiesFileName) throws IOException
      Returns a ReportConfiguration 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 a ReportConfiguration 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

      public static ModifiableReportConfiguration getReportConfiguration() throws IOException
      Returns the ModifiableReportConfiguration 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 the SDKConfiguration.
      Returns:
      the ModifiableReportConfiguration to use for this project
      Throws:
      IOException