|
org.netbeans.modules.server/0 1.10 | |||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||
See:
Description
| Common Server | |
|---|---|
| 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). It covers the services tab, server manager and server add wizard.
There is also API part of the module CommonServerAPI that provides API representation of the server instance. 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 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.
serverNodeHidden
If the action registered in Servers/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...
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
folder you can influence behaviour of the Servers
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.
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.
First initial release of the Common Server SPI.
An external module can register itself as the server instance provider.
In order do that it must register the implementation of
ServerInstanceProvider
in Servers 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 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 NetBeans Mercurial repositories.
Nothing.
Read more about the implementation in the answers to architecture questions.
|
org.netbeans.modules.server/0 1.10 | |||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||