| org.netbeans.spi.mobility.deployment.DeploymentPlugin
DeploymentPlugin | public interface DeploymentPlugin (Code) | | DeploymentPlugin is an SPI providing all the functionality and UI necessary to handle one deployment type (deployment method) to the NetBeans Mobility.
The plugin provides:
- deployment method name and display name
- set of global properties, their default values, and customizer (for usage in Mobility Deployment Manager)
- set of project properties, their default values, and customizer (for usage in each project customizer)
Default deployment plugins bundled with NetBeans Mobility are for example: Copy, Ftp, Scp, WebDAV, SonyEricsson, etc....
author: Adam Sotona |
Method Summary | |
public Component | createGlobalCustomizerPanel() This method returns UI panel for IDE global customization of the deployment plugin inside Mobility Deployment Manager.
Mobility Deployment Manager automatically scans the panel structure recursivelly, attach the listeners, read and write the property values.
All the properties customized by this panel must be defined by getGlobalPropertyDefaultValues method.
The connection between properties and UI components is defined through the name matching. | public Component | createProjectCustomizerPanel() This method returns UI panel for project-specific customization of the deployment plugin.
Project customizer automatically scans the panel structure recursivelly, attach the listeners, read and write the property values.
All the properties customized by this panel must be defined by getProjectPropertyDefaultValues method.
The connection between properties and UI components is defined through the name matching. | public String | getAntScriptLocation() Defines location of the Ant script performing the deployment.
The script has to define a default target which performs the deployment.
The script may depend on all well known project properties as it is called from the project build script.
In addition there is a special <nb-enter-password task. | public String | getDeploymentMethodDisplayName() This method defines human-readable name of the method.
The name can be longer and localized.
For example: File Transfer Protocol (FTP), or Secure Copy (SCP, SFTP). | public String | getDeploymentMethodName() This method defines the deployment method unique name used for identification (non-localized).
It is highly recomended to use Java identifier as the name (no spaces nor special characters).
For example: Copy, Ftp, WebDAV, etc... | public Map<String, Object> | getGlobalPropertyDefaultValues() This method defines set of Ant properties that will be stored globally in the IDE (physically in <userdir>/Build.properties).
There can be unlimited number of instances of each deployment plugin stored globally. | public Map<String, Object> | getProjectPropertyDefaultValues() |
createGlobalCustomizerPanel | public Component createGlobalCustomizerPanel()(Code) | | This method returns UI panel for IDE global customization of the deployment plugin inside Mobility Deployment Manager.
Mobility Deployment Manager automatically scans the panel structure recursivelly, attach the listeners, read and write the property values.
All the properties customized by this panel must be defined by getGlobalPropertyDefaultValues method.
The connection between properties and UI components is defined through the name matching. It means that each component that should be assigned to a property must return the property name by method getName(). You can assign a name to any of the component by calling setName("<property name>")
- JTextComponent (JTextField, etc...) can have assigned property with String default value.
- JCheckBox can have assigned property with Boolean default value. The boolean value of the property is matched with the selection status.
- JComboBox can have assigned property with String default value.
- JSlider can have assigned property with Integer value.
- JSpinner can have assigned property with Integer value.
- JRadioButton can have assigned property with String default value. The radio button will be selected when its action command equals to the property value. The property value will be set to the radio button action command when selected. The action command is taken from method getActionCommand() and you can set it by calling setActionCommand("<property value>") on the component.
There are no limitation of the other functionality provided by the customizer panel.
UI component that defines the customizer panel (usually JPanel) or null if the customizer is not provided. |
createProjectCustomizerPanel | public Component createProjectCustomizerPanel()(Code) | | This method returns UI panel for project-specific customization of the deployment plugin.
Project customizer automatically scans the panel structure recursivelly, attach the listeners, read and write the property values.
All the properties customized by this panel must be defined by getProjectPropertyDefaultValues method.
The connection between properties and UI components is defined through the name matching. It means that each component that should be assigned to a property must return the property name by method getName(). You can assign a name to any of the component by calling setName("<property name>")
- JTextComponent (JTextField, etc...) can have assigned property with String or File default value.
- JCheckBox can have assigned property with Boolean default value. The boolean value of the property is matched with the selection status.
- JComboBox can have assigned property with String default value.
- JSlider can have assigned property with Integer value.
- JSpinner can have assigned property with Integer value.
- JRadioButton can have assigned property with String default value. The radio button will be selected when its action command equals to the property value. The property value will be set to the radio button action command when selected. The action command is taken from method getActionCommand() and you can set it by calling setActionCommand("<property value>") on the component.
There are no limitation of the other functionality provided by the customizer panel.
UI component that defines the customizer panel (usually JPanel) or null if the customizer is not provided. |
getAntScriptLocation | public String getAntScriptLocation()(Code) | | Defines location of the Ant script performing the deployment.
The script has to define a default target which performs the deployment.
The script may depend on all well known project properties as it is called from the project build script.
In addition there is a special <nb-enter-password task. This task can be used to invoke NetBeans styled dialog to enter specific connection parameters during the execution (usually missing password).
For inspiration please take a look at the the default set of deployment type Ant scripts provided by NetBeans Mobility (under modules/scr/).
relative path of the Ant Script from install root, e.g. modules/scr/deploy-xxx-impl.xml (always using / as a separator, regardless of platform). |
getDeploymentMethodDisplayName | public String getDeploymentMethodDisplayName()(Code) | | This method defines human-readable name of the method.
The name can be longer and localized.
For example: File Transfer Protocol (FTP), or Secure Copy (SCP, SFTP).
Display name of the deployment method. |
getDeploymentMethodName | public String getDeploymentMethodName()(Code) | | This method defines the deployment method unique name used for identification (non-localized).
It is highly recomended to use Java identifier as the name (no spaces nor special characters).
For example: Copy, Ftp, WebDAV, etc...
deployment method identification name |
getGlobalPropertyDefaultValues | public Map<String, Object> getGlobalPropertyDefaultValues()(Code) | | This method defines set of Ant properties that will be stored globally in the IDE (physically in <userdir>/Build.properties).
There can be unlimited number of instances of each deployment plugin stored globally. Each instance defines its own set of values for these properties.
The property management and deployment instances management is guaranted by Mobility Deployment Manager and it is transparent for this plugin.
To avoid collisions it is highly recommended to prefix all properties following way: deployment.<deployment method name>..
The default values of the properties can be of following types:
- String - for customization using text component, combo box, or radio button group
- Boolean - for customization using check box
- Integer - for customization using slider, or spinner
Map of properties and their default values.Do not return null. Empty map returned means no global management and customization is requested by this plugin. |
getProjectPropertyDefaultValues | public Map<String, Object> getProjectPropertyDefaultValues()(Code) | | This method defines set of Ant properties that will be stored in each project (physically in nbproject/project.properties).
There can be unlimited number of project configurations and each can define its own set of values for these properties.
The correct property management and project configurations management is guaranted by Project Customizer and it is transparent for this plugin.
To avoid collisions it is highly recommended to prefix all properties following way: deployment.<deployment method name>..
The default values of the properties can be of following types:
- String - for customization using text component, combo box, or radio button group
- Boolean - for customization using check box
- Integer - for customization using slider, or spinner
- File - for customization using text component and storage as a file reference
Map of properties and their default values.Do not return null. Empty map returned means no project-based management and customization is requested by this plugin. |
|
|