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 for Update Center backend - allows to create and subscribe the Update Center in IDE.
Next there should be a API 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.
You can now ask that publicly downloadable files be included in an NBM.
Just replace netbeans/file
with a text file netbeans/file.external
with lines:
CRC:123456789
to specify an expected CRC-32 checksum (nonnegative decimal format)URL:http://.../...
to specify a download location (may be repeated to offer alternatives)You can embed system properties in a URL using Ant-like syntax: http://.../feature-for-${java.specification.version}.nbm
The <makenbm>
Ant task will automatically
avoid packing the actual file if the *.external
variant is also in the input cluster.
For convenience, the org.netbeans.modules.maven.embedder
module (if present) can also handle URLs of the forms
m2:/org.grp:art:1.0:jar
or m2:/org.grp:art:1.0:jar:javadoc
which can take advantage of the local repository as a cache.
Define icon when specifying an update center using
categoryIconBase
attribute.
New operation type - OperationSupport.OperationType.INTERNAL_UPDATE
is introduced.
This operation can be used to find out elements which have updates and
which the particular element has the dependency on.
The behaviour of UpdateItem.createFeature().getInstalled().isEnabled()
has been changed. Now it returns true
only if
all dependencies are enabled.
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 NetBeans Mercurial repositories.
Read more about the implementation in the answers to architecture questions.
Built on March 18 2014. | Portions Copyright 1997-2014 Sun Microsystems, Inc. All rights reserved.