public final class UpdateUnitProviderFactory extends Object
UpdateUnitProvider
, allow to create or removed them,
browse the providers or refresh its content.Modifier and Type | Method and Description |
---|---|
UpdateUnitProvider |
create(String name,
File... files)
Creates new
UpdateUnitProvider for temporary usage. |
UpdateUnitProvider |
create(String name,
String displayName,
URL url)
Creates new
UpdateUnitProvider and store its preferences. |
UpdateUnitProvider |
create(String name,
String displayName,
URL url,
String categoryIconBase,
String categoryDisplayName) |
UpdateUnitProvider |
create(String name,
String displayName,
URL url,
UpdateUnitProvider.CATEGORY category)
Creates new
UpdateUnitProvider and store its preferences. |
static UpdateUnitProviderFactory |
getDefault()
Returns singleton instance of
UpdateUnitProviderFactory |
List<UpdateUnitProvider> |
getUpdateUnitProviders(boolean onlyEnabled)
Returns
java.util.List of UpdateUnitProvider . |
void |
refreshProviders(ProgressHandle handle,
boolean force)
Re-read list of
UpdateUnitProvider from infrastucture and refresh its content
if force parameter is true . |
void |
remove(UpdateUnitProvider unitProvider)
Removes the
UpdateUnitProvider from the infrastucture. |
public static UpdateUnitProviderFactory getDefault()
UpdateUnitProviderFactory
public List<UpdateUnitProvider> getUpdateUnitProviders(boolean onlyEnabled)
java.util.List
of UpdateUnitProvider
. The parameter
onlyEnabled specifies if only enabled provider should be returned or all.onlyEnabled
- if only enabled provider should be returned or allpublic UpdateUnitProvider create(String name, String displayName, URL url, UpdateUnitProvider.CATEGORY category)
UpdateUnitProvider
and store its preferences. The new provider
is based of the given URL where is the Autoupdate Catalog.name
- name of provider, this name is used by Autoupdate infrastructure for manimulating
of providers.displayName
- display name of providerurl
- URL to Autoupdate Catalogcategory
- quality classification for every UpdateElement
comming from returned UpdateUnitProvider
public UpdateUnitProvider create(String name, String displayName, URL url, String categoryIconBase, String categoryDisplayName)
public UpdateUnitProvider create(String name, String displayName, URL url)
UpdateUnitProvider
and store its preferences. The new provider
is based of the given URL where is the Autoupdate Catalog.name
- name of provider, this name is used by Autoupdate infrastructure for manimulating
of providers.displayName
- display name of providerurl
- URL to Autoupdate Catalogpublic UpdateUnitProvider create(String name, File... files)
UpdateUnitProvider
for temporary usage. This provider contains
content of given NBMs.name
- name of provider, this name is used by Autoupdate infrastructure for manimulating
of providers.files
- NBM filespublic void remove(UpdateUnitProvider unitProvider)
UpdateUnitProvider
from the infrastucture.unitProvider
- public void refreshProviders(ProgressHandle handle, boolean force) throws IOException
UpdateUnitProvider
from infrastucture and refresh its content
if force
parameter is true
.handle
- started ProgressHandle or nullforce
- if true then refresh(true)
is called on all UpdateUnitProvider
IOException