Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

oracle.jdeveloper.template.wizard
Class NewObjectFromTemplateWizard

java.lang.Object
  extended by oracle.jdeveloper.template.wizard.NewObjectFromTemplateWizard
Direct Known Subclasses:
NewApplicationFromTemplateWizard, NewProjectFromTemplateWizard

public abstract class NewObjectFromTemplateWizard
extends java.lang.Object

A creation wizard designed to work with AbstractTemplate objects, specifically application and project templates. Because pages in the wizard can be randomly selected after having been visisited once, the wizard does page validation when moving forward or backward.


Nested Class Summary
protected  class NewObjectFromTemplateWizard.WizardEventAdapter
           
 
Constructor Summary
protected NewObjectFromTemplateWizard()
           
 
Method Summary
protected  void commitProjectChanges(oracle.bali.ewt.wizard.Wizard wizard, java.util.List<Project> projectList, Workspace workspace, Context context)
           
protected  void createDeploymentProfile(java.lang.String deploymentProfileClassName, Workspace workspace, Project project)
           
protected  java.util.List<Project> createProjects()
          Called when the wizard finished to create any projects defined in the active template.
protected abstract  void doPostCreationProcessing()
          Called when the wizard is finished and all other processing has happened: after the workspace and/or projects have been created, and the wizard pages allowed to make modifications to the generated application or projects.
protected  Workspace getOrCreateWorkspace()
          Called when the wizard is finished and the new workpace and/or projects(s) should be created.
protected  TraversableContext getWizardContext()
          Gets the TraversableContext used to share data between wizard pages.
protected abstract  java.awt.Image getWizardHeaderImage()
          Subclasses should return an image to display in the wizard header bar.
protected abstract  oracle.bali.ewt.wizard.dWizard.WizardSequence2 getWizardSequence()
          Subclasses should implement this method and return their sequence of wizard pages.
protected abstract  java.lang.String getWizardTitle()
          Subclasses should return text to display in the wizard title bar.
 TraversableContext initializeWizardDataContext(Context context, AbstractTemplate template)
          Initializes the TraversableContext used by the wizard: creates a new TraversableContext and calls populateTraversableContext(oracle.ide.panels.TraversableContext, oracle.jdeveloper.template.AbstractTemplate) to populate it with the necessary data.
protected abstract  void populateTraversableContext(TraversableContext tc, AbstractTemplate template)
          Subclasses should implement this method and populate the TraversableContext with the data necessary by the wizard.
 boolean runWizard(Context context, AbstractTemplate template)
          Creates and displays a dynamic wizard for creating either an application and one or more project(s), or a single project from the supplied template.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewObjectFromTemplateWizard

protected NewObjectFromTemplateWizard()
Method Detail

runWizard

public boolean runWizard(Context context,
                         AbstractTemplate template)
Creates and displays a dynamic wizard for creating either an application and one or more project(s), or a single project from the supplied template.

Parameters:
context - The active context
template - The template from which to create the application or project
Returns:
true if the wizard was finished, false if the user canceled the wizard

initializeWizardDataContext

public final TraversableContext initializeWizardDataContext(Context context,
                                                            AbstractTemplate template)
Initializes the TraversableContext used by the wizard: creates a new TraversableContext and calls populateTraversableContext(oracle.ide.panels.TraversableContext, oracle.jdeveloper.template.AbstractTemplate) to populate it with the necessary data. The TraversableContext can only be initialized once, so if the data member is non-null, this method will do nothing.

Note: This method is public to facilitate testing and should not be called directly in regular circumstances.

Parameters:
context - The active context
template - The template from which to create the application or project
Returns:
The wizard's shared data contxt object

getOrCreateWorkspace

protected Workspace getOrCreateWorkspace()
Called when the wizard is finished and the new workpace and/or projects(s) should be created. In the case of the New Project wizard, the workspace already exists. For the New Aplication wizard, the workspace should be created when this method is called.

By default, this method just returns the workspace from the active context.

Returns:
the workspace where new projects should be added

createDeploymentProfile

protected void createDeploymentProfile(java.lang.String deploymentProfileClassName,
                                       Workspace workspace,
                                       Project project)

createProjects

protected java.util.List<Project> createProjects()
Called when the wizard finished to create any projects defined in the active template.

Returns:
The list of projects that were created

commitProjectChanges

protected void commitProjectChanges(oracle.bali.ewt.wizard.Wizard wizard,
                                    java.util.List<Project> projectList,
                                    Workspace workspace,
                                    Context context)

getWizardContext

protected final TraversableContext getWizardContext()
Gets the TraversableContext used to share data between wizard pages.

Returns:
a TraversableContext

getWizardTitle

protected abstract java.lang.String getWizardTitle()
Subclasses should return text to display in the wizard title bar. The title should be in the form "Create Application/Project Name".

Returns:
the wizard title

getWizardHeaderImage

protected abstract java.awt.Image getWizardHeaderImage()
Subclasses should return an image to display in the wizard header bar.

Returns:
the wizard header image

populateTraversableContext

protected abstract void populateTraversableContext(TraversableContext tc,
                                                   AbstractTemplate template)
Subclasses should implement this method and populate the TraversableContext with the data necessary by the wizard. This method is called before the wizard, and any wizard pages are created.

Note: The active context is stored in the TraversableContext and can be retrieved by calling TemplateWizardUtil.getContext(oracle.ide.panels.TraversableContext).

Parameters:
template - The active ApplicationTemplate or ProjectTemplate, must not be null.

getWizardSequence

protected abstract oracle.bali.ewt.wizard.dWizard.WizardSequence2 getWizardSequence()
Subclasses should implement this method and return their sequence of wizard pages.

Returns:
A sequence of wizard pages

doPostCreationProcessing

protected abstract void doPostCreationProcessing()
Called when the wizard is finished and all other processing has happened: after the workspace and/or projects have been created, and the wizard pages allowed to make modifications to the generated application or projects.


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

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