See: Description
Package | Description |
---|---|
org.netbeans.api.server |
API providing the common server instances.
|
org.netbeans.api.server.properties |
Support API for persistence of server instance properties.
|
org.netbeans.spi.server |
SPI for registering different kinds of servers in the IDE.
|
The Server module provides the CommonServerSPI that contains SPIs needed for the UI presentation of servers (anykind) and cloud providers. It covers the services tab, server manager, server add wizard, cloud manager and cloud add wizard.
There is also API part of the module CommonServerAPI that provides API representation of the server and cloud instances. API access if required in future will be placed here.
Clients can provide its instances through the SPI. They can also provide wizards to define UI way for the server or cloud instance addition. It is done with CommonServerLayerSPI where the SPIs implementation must be registered.
To provide easy way for clients to persist properties of its instances easily, module provides support API CommonServerPropertiesAPI to do that. This support API is not mandatory for clients to use in any way.
ServersNodeActions
By registering actions to Servers/Actions
you
can extend the list of popup actions on Servers node in
Services tab.
CloudNodeActions
By registering actions to Cloud/Actions
you
can extend the list of popup actions on Cloud node in
Services tab.
serverNodeHidden
If the action registered in Servers/Actions
or Cloud/Actions
folder
has getValue("serverNodeHidden") == Boolean.TRUE
, then
it will not be shown in the popup menu.
wizardMessage
By adding wizardMessage
attribute you tell the
Add Server...
or Add Cloud...
action to display this message as an
option, if no servers are yet registered. If user agrees, your
action will be called then to enable some server providers.
The action then receives command noui
,
to know that it shall only enable given functionality, but there
is no need to show user anything.
By adding additional attributes to files in Servers/Actions
or Cloud/Actions
folder you can influence behaviour of the Servers
and Cloud
node.
By adding property-something
attribute you identify
an action that will be called as soon as the node is expanded and
System.getProperty("something")
is non-null.
By adding config-something
attribute you identify
an action that will be called as soon as the node is expanded and
FileUtil.getConfigFile("something")
is non-null.
In all of these cases, the action receives command noui
,
to know that it shall only enable given functionality, but there
is no need to show user anything.
These attribute based APIs shall be seen as temporary and subject to replacement. Please notify us as soon as you start to use them.
The ServerInstance became Lookup.Provider.
Added helper method invoking wizard for adding new server instance.
Reuse existing server support provided by this module and use
it to support concept of cloud providers. At the moment registration
of cloud providers is implemented (/Cloud
folder in layer). Their
visualization will be added later. This is work in progress.
By registering actions to Servers/Actions
you
can extend the list of popup actions on Servers node in
Services tab.
Support API providing easy way for persistence of instance properties. Not manadatory for clients to use.
An external module can register itself as the server instance provider.
In order to do that it must register the implementation of
ServerInstanceProvider
in Servers
or Cloud
folder in the layer.xml.
When this is done the module will handle displaying of instances at appropriate IDE dialogs and views. Note that more specific SPIs can still be required for the technology specific dialogs and actions. This module covers the areas where the "common server" term makes sence.
Every ServerInstance returned by the provider is handled by this module. Some features of the ServerInstance are not mandatory (as described in javadoc). If new instances can be added or removed during the lifecycle of external module it has to notify all listeners of the ServerInstanceProvider.
An external module can register the wizard(s) in order to allow the user
to add new instances. In order to do that it must register the implementation of
ServerWizardProvider
in Servers
or Cloud
folder in the layer.xml.
When this is done the module will offer this wizard in UI (at contexts where it makes sense).
The Commons Server SPI implemetor has to usually implement persistence of its instances somehow. There are many ways how this can be done. To make it easier InstancePropertiesManager can be used. It provides a way how to store and retrieve properties of the server instance.
|
|
|
The sources for the module are in the Apache Git repositories or in the GitHub repositories.
Nothing.
Read more about the implementation in the answers to architecture questions.