/** * Match an input to an update method * * @param input * @return */ public static UpdateMethod match(String input) { for (UpdateMethod method : values()) { if (method.toString().equalsIgnoreCase(input)) { return method; } } return null; }
public void init() { LWC lwc = LWC.getInstance(); updateBranch = UpdateBranch.match(lwc.getConfiguration().getString("updater.branch", "STABLE")); updateMethod = UpdateMethod.match(lwc.getConfiguration().getString("updater.method", "MANUAL")); if (updateMethod == UpdateMethod.AUTOMATIC) { this.loadVersions( true, new Runnable() { public void run() { tryAutoUpdate(false); logger.info("LWC: Latest version: " + latestVersion); } }); } // verify we have local files (e.g sqlite.jar, etc) this.verifyFiles(); this.downloadFiles(); }