public interface

FileUpdater

com.steerpath.sdk.storage.FileUpdater

Class Overview

This is mainly for SDK internals and has little use outside of the SDK.

Summary

Public Methods
abstract void downloadUpdate(String url, File file)
Downloads update for the File in the background.
abstract void downloadUpdate(File file)
Downloads update for the File in the background.
abstract File getUpdate(File file)
Returns local File from /updates folder.
abstract boolean install(String url, File file)
Takes updated File into use.
abstract boolean install(File file)
Takes updated File into use.
abstract boolean isExpired(File file)
Checks if File is expired.@return
abstract boolean isExpired(String url)
Checks if File is expired.@return
abstract boolean isUpdateAvailable(File file)
Checks if update has been downloaded for the File.
abstract void on200(File file, String url, String etag, long expiry)
After file update has been downloaded, notify network response code 200.
abstract void on304(File file, String url, String etag, long expiry)
After file update has been downloaded, notify network response code 304.
abstract void updateEtag(String url, File updateFile)
Updates File's etag.

Public Methods

public abstract void downloadUpdate (String url, File file)

Downloads update for the File in the background.

Parameters
url the url where the File was fetched
file file to be updated

public abstract void downloadUpdate (File file)

Downloads update for the File in the background.

Parameters
file file to be updated

public abstract File getUpdate (File file)

Returns local File from /updates folder.

public abstract boolean install (String url, File file)

Takes updated File into use.

Parameters
url the url where the File was fetched
file original "old" file

public abstract boolean install (File file)

Takes updated File into use.

Parameters
file original "old" file

public abstract boolean isExpired (File file)

Checks if File is expired.@return

public abstract boolean isExpired (String url)

Checks if File is expired.@return

public abstract boolean isUpdateAvailable (File file)

Checks if update has been downloaded for the File.

public abstract void on200 (File file, String url, String etag, long expiry)

After file update has been downloaded, notify network response code 200.

public abstract void on304 (File file, String url, String etag, long expiry)

After file update has been downloaded, notify network response code 304.

public abstract void updateEtag (String url, File updateFile)

Updates File's etag.