Class DataFileManager

java.lang.Object
com.deviceatlas.datafile.DataFileManager

public class DataFileManager extends Object
  • Constructor Details

  • Method Details

    • getDownloadedDataFilePath

      public String getDownloadedDataFilePath() throws DataLoadingException
      If the temporary data file exists on the system return the temporary file path. If the data file exists return the file path. If the data file does not exist download it and return the temporary path the data file was saved to.
      Returns:
      Throws:
      DataLoadingException
    • persistDataFile

      public void persistDataFile() throws DataLoadingException
      The data file is downloaded into a temporary file. After the temporary file has been loaded by the API without exception this method will replace the existing data file with the temporary file.
      Throws:
      DataLoadingException
    • scheduleDownloadAndReloadTask

      public void scheduleDownloadAndReloadTask()
      Schedule a task to download the data file and load it into the API. This is ignored if the data file config has disabled scheduling of the data file download and load. If the current data file on the system is stale the task is scheduled to run immediately. If the current data file on the system is not stale then the task is scheduled to run in the configured days in the future. Note: If the user has configured the download/load task to run at a specific time then this will be honoured even if the file is stale.