public final class UpdateUnitProvider extends Object
UpdateUnitProvider
providers UpdateUnit
. The units
are build of the of SPI UpdateProvider
.UpdateProvider
Modifier and Type | Class and Description |
---|---|
static class |
UpdateUnitProvider.CATEGORY |
Modifier and Type | Method and Description |
---|---|
UpdateUnitProvider.CATEGORY |
getCategory()
Deprecated.
|
String |
getContentDescription()
A description of content staging by this provider.
|
String |
getDescription()
Description of provider.
|
String |
getDisplayName()
Display name of provider.
|
String |
getName()
Name of provider, this name is used by Autoupdate infrastructure for manimulating
of providers.
|
URL |
getProviderURL()
It's special support for
UpdateProvider based on Autoupdate Catalog. |
String |
getSourceDescription()
The description of this provider.
|
Image |
getSourceIcon()
The icon associated with this provider.
|
List<UpdateUnit> |
getUpdateUnits()
Returns
java.util.List of UpdateUnit build of the content of the
provider. |
List<UpdateUnit> |
getUpdateUnits(UpdateManager.TYPE... types)
Returns
java.util.List of UpdateUnit build of the content of the
provider. |
boolean |
isEnabled()
Returns
true if the provider is automatically checked and its UpdateUnit are
returned from UpdateManager |
boolean |
isTrusted()
Returns
true if the provider is considered to be trusted. |
boolean |
refresh(ProgressHandle handle,
boolean force)
Make refresh of content of the provider.
|
void |
setDisplayName(String name)
Sets the display name of the provider.
|
void |
setEnable(boolean state)
Sets the enable flag.
|
void |
setProviderURL(URL url)
Modified URL of URL-based provider.
|
void |
setTrusted(boolean trusted)
Sets the trusted flag.
|
String |
toString() |
public String getName()
public String getDisplayName()
public void setDisplayName(String name)
name
- public String getDescription()
@Deprecated public UpdateUnitProvider.CATEGORY getCategory()
UpdateUnitProvider.getSourceIcon()
and UpdateUnitProvider.getSourceDescription()
.public Image getSourceIcon()
UpdateElement.getSourceIcon()
public String getSourceDescription()
UpdateUnitProvider.getSourceIcon()
.
In case no special description is found, a general one is returned.UpdateElement.getSourceDescription()
public String getContentDescription()
null
public URL getProviderURL()
UpdateProvider
based on Autoupdate Catalog.
It's most kind of Update Providers and have a special support in UI.public void setProviderURL(URL url)
url
- new URLpublic List<UpdateUnit> getUpdateUnits()
java.util.List
of UpdateUnit
build of the content of the
provider.public List<UpdateUnit> getUpdateUnits(UpdateManager.TYPE... types)
java.util.List
of UpdateUnit
build of the content of the
provider.types
- returns UpdateUnit
s contain only given types, e.g. modules for MODULE
type.
If types is null
or null then returns default typespublic boolean refresh(ProgressHandle handle, boolean force) throws IOException
force
parameter forces reading content from
remote server.handle
- started ProgressHandle or nullforce
- if true then forces to reread the content from serverIOException
- when any network problem apprearedpublic boolean isEnabled()
true
if the provider is automatically checked and its UpdateUnit
are
returned from UpdateManager
public void setEnable(boolean state)
state
- UpdateUnitProvider.isEnabled()
public void setTrusted(boolean trusted)
trusted
- UpdateUnitProvider.isTrusted()
public boolean isTrusted()
true
if the provider is considered to be trusted.
If UpdateItem
are provided by a trusted UpdateUnitProvider
and can be linked to it (for example because the provider provides
checksums in the catalog), they are considered trusted by the Autoupdate
mechanism and will not trigger certificate warnings.