Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.ide.wizard
Class WizardManager

java.lang.Object
  extended by oracle.ide.wizard.WizardManager

public final class WizardManager
extends java.lang.Object

WizardManager provides the interface through which the IDE handles Wizards.

Wizards use the WizardManager to register themselves as Wizards.

In addition, Wizards or other classes can use the WizardManager to retrieve the list of currently registered Wizards.

If a Wizard does not need to be notified on startup and shutdown from the IDE, then the Wizard does not need to register itself as an Addin from the IDE, but can simple register itself as a wizard. Most Wizard instances that fit this description are invoked from the New Object Gallery. In this case, when the New Object Gallery is first created, all Wizard instances which are not already loaded from the AddinManager, will be initialized at this time.

The current WizardManager can be retrieved by calling WizardManager.getInstance().

See Also:
Wizard

Field Summary
static java.lang.String OPEN_WIZARD_CMD
           
static int OPEN_WIZARD_CMD_ID
           
 
Method Summary
static WizardManager getInstance()
          The WizardManager object is a singleton class.
 Invokable getInvokable(java.lang.ClassLoader loader, java.lang.String className)
          Gets the Invokable with the given class name.
 Wizard getWizard(java.lang.Class clazz)
          Gets the Wizard matching the given class from the list of registered wizards.
 Wizard getWizard(java.lang.ClassLoader loader, java.lang.String className)
          Gets the Wizard instance for the given class name.
 Wizard getWizard(java.lang.String className)
          Deprecated. Use getWizard(ClassLoader,String). Since 11.1.1.0.
 void invokeSecondaryWizard(Invokable invokable, Context context, java.lang.String[] params, java.lang.String[] technologyKeys)
          This method should be used to launch an Invokable from another wizard.
 void invokeSecondaryWizard(Invokable invokable, Context context, java.lang.String wizardId, java.lang.String[] params, java.lang.String[] technologyKeys)
          This method should be used to launch an Invokable from another wizard.
 boolean invokeWizard(Invokable invokable, Context context, java.lang.String[] params, java.lang.String[] technologyKeys)
          Loads an Invokable with the specified execution context and parameters.
 boolean invokeWizard(Invokable invokable, Context context, java.lang.String wizardId, java.lang.String[] params, java.lang.String[] technologyKeys)
          Invokes the Invokable with the specified execution context and parameters.
 void registerWizard(Wizard wizard)
          Registers a wizard with the Wizard Manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPEN_WIZARD_CMD_ID

public static final int OPEN_WIZARD_CMD_ID

OPEN_WIZARD_CMD

public static final java.lang.String OPEN_WIZARD_CMD
See Also:
Constant Field Values
Method Detail

getInstance

public static WizardManager getInstance()
The WizardManager object is a singleton class. This method gets this object's single instance.

Returns:
the WizardManager single instance.

getInvokable

public Invokable getInvokable(java.lang.ClassLoader loader,
                              java.lang.String className)
Gets the Invokable with the given class name. If no Invokable is found, or an error occurs loading the specified class, then null is returned.

Parameters:
loader - The loader from which to load the specified class.
className - The fully qualified name of the Invokable class.
Returns:
an Invokable instance, or null
Throws:
java.lang.NullPointerException - if loader or className is null.
Since:
11.1.2.0.0

getWizard

public Wizard getWizard(java.lang.Class clazz)
Gets the Wizard matching the given class from the list of registered wizards. If an extact match is not found, the first Wizard whose type is assignable from the given class is returned. If no Wizard is found, then null is returned.

Parameters:
clazz - The class of the wizard to return
See Also:
registerWizard(oracle.ide.wizard.Wizard)

getWizard

@Deprecated
public Wizard getWizard(java.lang.String className)
Deprecated. Use getWizard(ClassLoader,String). Since 11.1.1.0.


getWizard

public Wizard getWizard(java.lang.ClassLoader loader,
                        java.lang.String className)
Gets the Wizard instance for the given class name. If an error occurs loading the specified class, then null is returned.

Parameters:
loader - The loader from which to load the specified class.
className - The fully qualified name of the wizard class.
Returns:
a Wizard instance, or null if the wizard was not found, or an error occurs loading it.
Throws:
java.lang.NullPointerException - if loader or className are null.
Since:
11.1.1.0.0

registerWizard

public void registerWizard(Wizard wizard)
Registers a wizard with the Wizard Manager. If the Wizard returns a non-null MenuSpec from getMenuSpecification a menu item for the Wizard will be added to the "Tools" menu.

Parameters:
wizard - a non-null Wizard
See Also:
registerWizard(Wizard)

invokeWizard

public boolean invokeWizard(Invokable invokable,
                            Context context,
                            java.lang.String[] params,
                            java.lang.String[] technologyKeys)
Loads an Invokable with the specified execution context and parameters.

If the execution context has an associated Project, then the project's technology scope is updated according to the specified technology keys via TechnologyScopeConfiguration.updateTechnologyScope(String[]).

Parameters:
invokable - The Invokable to invoke. This must not be null.
context - The execution context for the wizard. This should not be null.
params - The parameters to pass to the wizard. This may be null.
technologyKeys - The technology keys associated with the wizard. This may be null.
Returns:
true if the wizard completed successfully, otherwise false.

invokeWizard

public boolean invokeWizard(Invokable invokable,
                            Context context,
                            java.lang.String wizardId,
                            java.lang.String[] params,
                            java.lang.String[] technologyKeys)
Invokes the Invokable with the specified execution context and parameters.

If the execution context has an associated Project, then the project's technology scope is updated according to the specified technology keys via TechnologyScopeConfiguration.updateTechnologyScope(String[]).

Parameters:
invokable - The Invokable to invoke. This must not be null.
context - The execution context for the wizard. This should not be null.
wizardId - The id of the wizard being invoked. This may be null.
params - The parameters to pass to the wizard. This may be null.
technologyKeys - The technology keys associated with the wizard. This may be null.
Returns:
true if the wizard completed successfully, otherwise false.

invokeSecondaryWizard

public void invokeSecondaryWizard(Invokable invokable,
                                  Context context,
                                  java.lang.String[] params,
                                  java.lang.String[] technologyKeys)
This method should be used to launch an Invokable from another wizard. It posts an event that in turn posts another event to invoke the new Invokable. This two-stage event posting is necessary in order to ensure that any cleanup needed when we close the first wizard occurs BEFORE we bring up the new Wizard.

If the execution context has an associated Project, then the project's technology scope is updated according to the specified technology keys via TechnologyScopeConfiguration.updateTechnologyScope(String[]).

Parameters:
invokable - The invokable to execute.
context - The execution context for the invokable.
params - The parameters to pass to the invokable.
technologyKeys - The technology keys associated with the invokable.

invokeSecondaryWizard

public void invokeSecondaryWizard(Invokable invokable,
                                  Context context,
                                  java.lang.String wizardId,
                                  java.lang.String[] params,
                                  java.lang.String[] technologyKeys)
This method should be used to launch an Invokable from another wizard. It posts an event that in turn posts another event to invoke the new Wizard. This two-stage event posting is necessary in order to ensure that any cleanup needed when we close the first wizard occurs BEFORE we bring up the new Wizard.

If the execution context has an associated Project, then the project's technology scope is updated according to the specified technology keys via TechnologyScopeConfiguration.updateTechnologyScope(String[]).

Parameters:
invokable - The invokable to execute.
context - The execution context for the invokable.
wizardId - The wizard id.
params - The parameters to pass to the invokable.
technologyKeys - The technology keys associated with the invokable.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

Copyright © 1997, 2011, Oracle. All rights reserved.