Class UpdateSources
{
"applicationName": "MyAmazingApplication",
"updateSources": [
{
"name": "Web server at www.test.example",
"baseUrl": "http://www.test.example/MyAmazingApplication/",
"versionManifest": "version_manifest.json",
"publicKey": "public.key"
}
]
}
The above example shows an application with a single remote update source. The public key is optional, but recommended to allow for digital signature verification on downloaded extension jars.
Where's all the information detailing my extensions? - that information is NOT bundled with the application, because the whole idea is that you can release new extensions AFTER your application has shipped. The UpdateManager class will read the version manifest pointed to by the update sources json, and will be able to dynamically discover new extensions and new versions of existing extensions. The version manifest can be updated after the application is released, with no changes needed on the client side.
How do I set all this up? - There's a helper application called ExtPackager that can walk you through the process of setting up your UpdateSources json and your VersionManifest, and can also help you with things like digitally signing your extension jars, providing screenshots for each version, and uploading to your web host via FTP. You don't have to write this json by hand!
- Since:
- swing-extras 2.5
- Author:
- scorbo2
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a single remote update source, for use with the UpdateConfiguration class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddUpdateSource(UpdateSources.UpdateSource updateSource) booleanstatic UpdateSourcesFactory method to generate an UpdateSources instance from the given json file, assuming that the file is readable and contains well-formed json.static UpdateSourcesFactory method to generate an UpdateSources instance from the given raw json string, assuming that the json is well-formed and parseable.inthashCode()booleanvoidsetAllowSnapshots(boolean allowSnapshots)
-
Constructor Details
-
UpdateSources
-
-
Method Details
-
fromJson
Factory method to generate an UpdateSources instance from the given raw json string, assuming that the json is well-formed and parseable.- Throws:
com.google.gson.JsonParseException
-
fromFile
public static UpdateSources fromFile(File file) throws IOException, com.google.gson.JsonParseException Factory method to generate an UpdateSources instance from the given json file, assuming that the file is readable and contains well-formed json.- Throws:
IOExceptioncom.google.gson.JsonParseException
-
getApplicationName
-
getUpdateSources
-
addUpdateSource
-
isAllowSnapshots
public boolean isAllowSnapshots() -
setAllowSnapshots
public void setAllowSnapshots(boolean allowSnapshots) -
equals
-
hashCode
public int hashCode()
-