public class DefaultUpdateRepository extends Object implements UpdateRepository
UpdateRepository.| Constructor and Description |
|---|
DefaultUpdateRepository(String id,
URL url)
Instantiates a new default update repository.
|
DefaultUpdateRepository(String id,
URL url,
String pluginsJsonFileName) |
| Modifier and Type | Method and Description |
|---|---|
FileDownloader |
getFileDownloader()
Each repository has the option of overriding the download process.
|
FileVerifier |
getFileVerifier()
Gets a file verifier to execute on the downloaded file for it to be claimed valid.
|
String |
getId() |
PluginInfo |
getPlugin(String id)
Get a particular plugin information from this repository.
|
Map<String,PluginInfo> |
getPlugins()
Get all plugin information for this repository.
|
String |
getPluginsJsonFileName()
Gets the plugins json file name.
|
URL |
getUrl() |
void |
refresh()
Causes
plugins.json to be read again to look for new updates from repositories. |
void |
setPluginsJsonFileName(String pluginsJsonFileName)
Choose another file name than
plugins.json. |
public DefaultUpdateRepository(String id, URL url)
plugins.json will be used. Please use
DefaultUpdateRepository(String, URL, String) if you want to choose
another file name than plugins.json}.id - the repository idurl - the repository urlpublic String getId()
getId in interface UpdateRepositorypublic URL getUrl()
getUrl in interface UpdateRepositorypublic Map<String,PluginInfo> getPlugins()
UpdateRepositorygetPlugins in interface UpdateRepositorypublic PluginInfo getPlugin(String id)
UpdateRepositorygetPlugin in interface UpdateRepositoryid - the id of the pluginpublic void refresh()
plugins.json to be read again to look for new updates from repositories.refresh in interface UpdateRepositorypublic FileDownloader getFileDownloader()
UpdateRepositorygetFileDownloader in interface UpdateRepositorypublic FileVerifier getFileVerifier()
getFileVerifier in interface UpdateRepositoryFileVerifierspublic String getPluginsJsonFileName()
plugins.json if null.public void setPluginsJsonFileName(String pluginsJsonFileName)
plugins.json.pluginsJsonFileName - the name (relative) of plugins.json file.
If null, will default to plugins.jsonCopyright © 2020. All rights reserved.