public class DeployWizard extends Wizard
The Wizard is constructed on-the-fly using the Deployment ToolkitRegistry
depending on the selected element in the Context
passed to isAvailable()
or invoke()
If the Wizard steps have been successfully completed, the getDeployCommand()
method will return the command to be used to run the deployment. The command should
be run on a non-event thread.
DeployWizard wizard = new DeployWizard(); Context context = Context.newIdeContext(); context.setElement( myProfile ); if ( wizard.isAvailable( context )) { boolean success = wizard.invoke(context); if ( success ) { final DeployCommand cmd = wizard.getDeployCommand(); Runnable cmdRunnable = new Runnable() { void run() { cmd.doIt(); } } Thread thread = new Thread(cmdRunnable); thread.start(); } }
Constructor and Description |
---|
DeployWizard() |
Modifier and Type | Method and Description |
---|---|
DeployCommand |
getCommand() |
Namespace |
getData()
Returns the data object used by this Wizard.
|
java.lang.String |
getShortLabel()
Provides the label that represents the Wizard in the Object Gallery.
|
boolean |
invoke(Context context)
Invokes the Wizard for given context.
|
boolean |
isAvailable(Context context)
Checks if a DeployWizard can be created for given Context.
|
getIcon, getLegacyParams, getLongLabel, getMenuSpecification, getToolTipText, getWizardId, setLegacyParams, setWizardId, toString
public boolean isAvailable(Context context)
This command can return false if there is no DeployWizardBuilder
in the ToolkitRegistry
that recognizes the context. Typically, most
builders would recognize the selected Element in the context (as returned
by context.getElement()
although this is not mandated. A builder
can choose to create a wizard for more than one element in the context.
isAvailable
in class Wizard
context
- public boolean invoke(Context context)
context
- isAvailable(context)
public DeployCommand getCommand()
public Namespace getData()
public java.lang.String getShortLabel()
Wizard
getShortLabel
in class Wizard