Package com.deviceatlas.datafile
Class DataFileManager
java.lang.Object
com.deviceatlas.datafile.DataFileManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIf the temporary data file exists on the system return the temporary file path.voidThe data file is downloaded into a temporary file.voidSchedule a task to download the data file and load it into the API.
-
Constructor Details
-
DataFileManager
-
-
Method Details
-
getDownloadedDataFilePath
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
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.
-