See: Description
Package | Description |
---|---|
org.netbeans.api.autoupdate |
Services for searching, downloading and installing NBM with new functionality or updates of installed modules.
|
org.netbeans.spi.autoupdate |
The provider this SPI can be plugged into Autoupdate's Updates Providers and can
supply NBM to Autoupdate Services.
|
AutoUpdate feature provides several services to IDE: download and install available updates of installed modules, search and install new features from subscribed Update Centers, browsing and manipulating the modules in IDE installation and handling of module localizations. To use the services have to AutoUpdate supply a GUI to easy manipulating. AutoUpdate feature has to care about registration Update Centers as well.
Several several services means that Autoupdate feature contain several parts of functionality.
These part of AutoUpdate should communicate each other. Moreover, some interface should be public.
One of them is SPI (org.netbeans.spi.autoupdate
) for Update Center backend - allows to create and subscribe the Update Center in IDE.
Next there should be a API (org.netbeans.api.autoupdate
) which communicate to rest of IDE and provide some services what is useful for
NB installers, a non-visual client of Auto Update which make possible to use Auto Update from command line
as standalone application in "admin" mode. All of them needs a APIs. This document describes proposed APIs,
supposed use-cases and design of interaction Auto Update parts each other.
OperationContainer
has a new setUnpack200
method. There is also a preference also used by
upgrader - read more.
The UpdateUnitProvider can now be declared trusted. If UpdateItems 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.
The validation of signatures of NBMs was done by checking if at least a partial certificate chain was present and if that chain was valid (i.e. not expired, not revoked). Instead of relying on this partial check this version bases the verification on a list of trusted certificates, similar to the existing KeyStoreProvider.
The existing KeyStoreProviders provide Certificates, that are fully trusted. The new getTrustLevel method allows a KeyStoreProvider to provide certificate for the new, lower trusted level. In addition to the to levels TRUST and VALIDATE, two variants: TRUST_CA and VALIDATE_CA are introduced. Certificates provided with that level are expected to be CA certificates and they are only trusted if a `CertPathValidator` validates the chain.
A distributed feature may list a module, which is only available on some update center, in NB IDE case because of licensing issues. This token must be reported so the as part of the UpdateElement and Operation so the caller may initiate the download operation.
Added a method UpdateUnit.getVisibleAncestor()
which returns a visible plugin
which depending upon this unit. Returns a unit if this unit is installed in the system and some of visible
units depending upon this one, otherwise returns null.
UpdateUnit
which describes all instances of unit, e.g. installation in IDE,
all its available updates, optionlly its backup instance.
UpdateUnit
can represent either a feature (e.g. group
of modules), a single module or a localization.
Proposed usage of API: Call List<UpdateUnit> UpdateManager.getDefault().getUpdateUnits()
List<UpdateUnit> UpdateManager.getDefault().getUpdateUnits(UpdateStyle style)
List<UpdateUnit> UpdateManager.getDefault().getUpdateUnits(UpdateStyle style)
and filter units which haven't been installed yet.
UpdateUnit
s
which are applicable to active IDE. UpdateManager
will
search all available UpdateUnit
given attribute.
UpdateUnit
by module's code name and finds UpdateElement
what fits the required version.
UpdateElement
which wants to install.
OperationContainer
for install, e.g. OperationContainer.createForInstall
OperationContainer.add(UpdateElement)
and gets OperationInfo
for that operation.
OperationInfo.getRequiredElements()
OperationInfo.getBrokenDependency()
Note: if there are some broken dependencies then operation cannot continue.
OperationContainer.doOperation()
UpdateElement
which wants to uninstall.
OperationContainer
for uninstall, e.g. OperationContainer.createForUninstall
OperationContainer.add(UpdateElement)
and gets OperationInfo
for that operation.
OperationInfo.getRequiredElements()
OperationContainer.doOperation()
UpdateElement
which wants to uninstall.
OperationContainer
for disable, e.g. OperationContainer.createForDisable
OperationContainer.add(UpdateElement)
and gets OperationInfo
for that operation.
OperationInfo.getRequiredElements()
OperationContainer.doOperation()
UpdateElement
which wants to uninstall.
OperationContainer
for enable, e.g. OperationContainer.createForEnable
OperationContainer.add(UpdateElement)
and gets OperationInfo
for that operation.
OperationInfo.getRequiredElements()
OperationContainer.doOperation()
OperationContainer
and OperationInfo
identifies some problems,
i.e. broken dependencies, needs to install more units, the operation causes disable some
other modules and so on. The client can use this information to consult these with end-user.
UpdateUnitProvider
.
Proposed usage of API: Call UpdateUnitProviderFactory.getUpdateUnitProviders()
UpdateUnitProviderFactory.create()
which creates and registered
new one subscription in the system and will be used from that time in the future.
UpdateUnitProviderFactory.setEnable(UpdateUnitProvider, boolean)
.
UpdateUnitProviderFactory.remove(Id)
.
UpdateUnitProvider.refresh()
.
|
|
|
|
|
|
The sources for the module are in the Apache Git repositories or in the GitHub repositories.
Read more about the implementation in the answers to architecture questions.