Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.rse.ui.wizard.cmds
Class AbstractNewQSYSObjectWizardMainPage

java.lang.Object
  extended by AbstractSystemWizardPage
      extended by com.ibm.etools.iseries.rse.ui.wizard.cmds.AbstractNewQSYSObjectWizardMainPage
All Implemented Interfaces:
IQSYSLibraryPromptListener, IQSYSObjectPromptListener
Direct Known Subclasses:
NewQSYSDataAreaWizardMainPage, NewQSYSDataQWizardMainPage, NewQSYSLibraryWizardMainPage, NewQSYSMemberWizardMainPage, NewQSYSMsgFileWizardMainPage, NewQSYSSourceFileWizardMainPage

public abstract class AbstractNewQSYSObjectWizardMainPage
extends AbstractSystemWizardPage
implements IQSYSObjectPromptListener

Abstract base class for the Second page of the wizards for creating various types of new iSeries objects.


Field Summary
static String CMDDFT
           
static String[] CMDDFT_ARRAY
           
protected  String cmdStringDelta
           
protected  Label commandSoFar
           
protected  String commandString
           
protected  IHost connection
           
protected  IBMiConnectionCombo connPrompt
           
static String copyright
           
protected  QSYSBasePrompt entryObjPrompt
           
protected  Text entryObjText
           
protected  SystemMessage errorMessage
           
protected  String inpLib
           
protected  String inpObj
           
protected  String inpText
           
protected  String newLib
           
protected  String newObj
           
protected  String newText
           
 
Constructor Summary
AbstractNewQSYSObjectWizardMainPage(Wizard wizard, IHost connection, String pageID, String title, String description, String helpID)
          Constructor.
 
Method Summary
protected  String buildCommandString()
          Build up the iSeries command from current contents...
protected abstract  String buildCommandStringDelta()
          For child subclasses.
protected  String buildOurCommandStringDelta()
          Build up the iSeries command for this page's information only, from current contents...
 Control createContents(Composite parent)
          CreateContents is the one method that must be overridden from the parent class.
static Label createRigidFillerLabel(Composite parent, int span)
          Creates a label for use a simple filler, to eat up space.
protected abstract  String getCommandStart()
          Return the start of the command.
 String getCommandString()
          Return the command string to execute remotely
protected  String getCommandStringDelta()
          Get the command string delta this page appends to that of the first page
 IHost getConnection()
          Return the connection selected or specified
protected  Control getInitialFocusControl()
          Return the Control to be given initial focus.
 String getLibraryName()
          Return the name of the library containing the data queue to create
protected  QSYSLibraryPrompt getLibraryPrompt()
          Return the object prompt cast to an ISeriesLibraryPrompt Do not call unless that is what it is!
 String getObjectName()
          Return the name of the data queue to create
protected  QSYSObjectPrompt getObjectPrompt()
          Return the object prompt cast to an ISeriesObjectPrompt.
protected abstract  QSYSBasePrompt getObjectPrompt(Composite composite_prompts, int nbrColumns)
          Return the widget for prompting for the object
 String getObjectText()
          Return the text of the object to create
protected  AbstractNewQSYSObjectWizard getOurWizard()
          Return the parent wizard
protected abstract  String getTextLabel()
          Return the label to use to get the xlated label and tooltip for the TEXT fields
protected abstract  String getTextTooltip()
          Return the label to use to get the xlated label and tooltip for the TEXT fields
 void handleEvent(Event e)
          Handles events generated by controls on this page.
protected abstract  boolean internalIsPageComplete()
          Do page completion testing beyond what the base class does.
 boolean isPageComplete()
          Return true if the page is complete, so to enable Finish.
 void libraryNameChanged(SystemMessage error)
          From IQSYSLibraryPromptListener.
 void objectNameChanged(SystemMessage error)
          From IQSYSObjectPromptListener.
 boolean performFinish()
          Completes processing of the wizard.
protected abstract  Control performFinishValidation()
          Do validation beyond what the base class does, when Finish is pressed.
protected abstract  void populateControls(Composite composite_prompts, int nbrColumns)
          Populate the content area with additional controls beyond what the parent supplies...
protected abstract  void prepareControls()
          Pre-fill any child-class-unique controls with passed-in data, and set any keystroke listeners...
 void setConnection(IHost connection)
          Set the connection.
 void setLibraryName(String lib)
          Set library name field's initial value
 void setObjectName(String file)
          Set object name field's initial value
 void setObjectText(String text)
          Set TEXT field's initial value
 void setVisible(boolean visible)
          Override of parent so we can update the command-so-far to show what was changed on the second page
protected abstract  void sizeControls(Composite composite_prompts, int nbrColumns)
          Adjust the size of any child-class-unique controls...
protected  SystemMessage validateTextInput()
          Validate member text, as it is typed.
 void widgetDefaultSelected(SelectionEvent event)
          From SelectionListener.
 void widgetSelected(SelectionEvent event)
          From SelectionListener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

connPrompt

protected IBMiConnectionCombo connPrompt

entryObjPrompt

protected QSYSBasePrompt entryObjPrompt

entryObjText

protected Text entryObjText

commandSoFar

protected Label commandSoFar

connection

protected IHost connection

errorMessage

protected SystemMessage errorMessage

inpLib

protected String inpLib

inpObj

protected String inpObj

inpText

protected String inpText

newLib

protected String newLib

newObj

protected String newObj

newText

protected String newText

commandString

protected String commandString

cmdStringDelta

protected String cmdStringDelta

CMDDFT

public static final String CMDDFT
See Also:
Constant Field Values

CMDDFT_ARRAY

public static final String[] CMDDFT_ARRAY
Constructor Detail

AbstractNewQSYSObjectWizardMainPage

public AbstractNewQSYSObjectWizardMainPage(Wizard wizard,
                                           IHost connection,
                                           String pageID,
                                           String title,
                                           String description,
                                           String helpID)
Constructor.

Method Detail

getOurWizard

protected AbstractNewQSYSObjectWizard getOurWizard()
Return the parent wizard


getObjectPrompt

protected QSYSObjectPrompt getObjectPrompt()
Return the object prompt cast to an ISeriesObjectPrompt. Do not call unless that is what it is!


getLibraryPrompt

protected QSYSLibraryPrompt getLibraryPrompt()
Return the object prompt cast to an ISeriesLibraryPrompt Do not call unless that is what it is!


setConnection

public void setConnection(IHost connection)
Set the connection. This can be called later if null is passed in the constructor


setLibraryName

public void setLibraryName(String lib)
Set library name field's initial value


setObjectName

public void setObjectName(String file)
Set object name field's initial value


setObjectText

public void setObjectText(String text)
Set TEXT field's initial value


createContents

public Control createContents(Composite parent)
CreateContents is the one method that must be overridden from the parent class. In this method, we populate an SWT container with widgets and return the container to the caller (JFace). This is used as the contents of this page.


getInitialFocusControl

protected Control getInitialFocusControl()
Return the Control to be given initial focus. Override from parent. Return control to be given initial focus.


handleEvent

public void handleEvent(Event e)
Handles events generated by controls on this page. Overridden from parent.


widgetSelected

public void widgetSelected(SelectionEvent event)
From SelectionListener. Called when widget selected


widgetDefaultSelected

public void widgetDefaultSelected(SelectionEvent event)
From SelectionListener. Called when widget selected via Enter


buildCommandString

protected String buildCommandString()
Build up the iSeries command from current contents...


buildOurCommandStringDelta

protected String buildOurCommandStringDelta()
Build up the iSeries command for this page's information only, from current contents...


libraryNameChanged

public void libraryNameChanged(SystemMessage error)
From IQSYSLibraryPromptListener. Called as user types library name. Given string is error message.

Specified by:
libraryNameChanged in interface IQSYSLibraryPromptListener
Parameters:
error - Will be null if the input is valid, or a translated msg if not

objectNameChanged

public void objectNameChanged(SystemMessage error)
From IQSYSObjectPromptListener. Called as user types object name. Given string is error message.

Specified by:
objectNameChanged in interface IQSYSObjectPromptListener
Parameters:
error - Will be null if the input is valid, or a translated msg if not

validateTextInput

protected SystemMessage validateTextInput()
Validate member text, as it is typed.


performFinish

public boolean performFinish()
Completes processing of the wizard. If this method returns true, the wizard will close; otherwise, it will stay active. This method is an override from the parent Wizard class.

Returns:
whether the wizard finished successfully

isPageComplete

public boolean isPageComplete()
Return true if the page is complete, so to enable Finish. Called by wizard framework.


setVisible

public void setVisible(boolean visible)
Override of parent so we can update the command-so-far to show what was changed on the second page


getConnection

public IHost getConnection()
Return the connection selected or specified


getCommandString

public String getCommandString()
Return the command string to execute remotely


getLibraryName

public String getLibraryName()
Return the name of the library containing the data queue to create


getObjectName

public String getObjectName()
Return the name of the data queue to create


getObjectText

public String getObjectText()
Return the text of the object to create


getCommandStringDelta

protected String getCommandStringDelta()
Get the command string delta this page appends to that of the first page


createRigidFillerLabel

public static Label createRigidFillerLabel(Composite parent,
                                           int span)
Creates a label for use a simple filler, to eat up space. This is for a rigid filler that doesn't consume space.

Parameters:
parent - Composite to put the field into.
span - Horizontal span

getTextLabel

protected abstract String getTextLabel()
Return the label to use to get the xlated label and tooltip for the TEXT fields


getTextTooltip

protected abstract String getTextTooltip()
Return the label to use to get the xlated label and tooltip for the TEXT fields


getObjectPrompt

protected abstract QSYSBasePrompt getObjectPrompt(Composite composite_prompts,
                                                  int nbrColumns)
Return the widget for prompting for the object


populateControls

protected abstract void populateControls(Composite composite_prompts,
                                         int nbrColumns)
Populate the content area with additional controls beyond what the parent supplies...


prepareControls

protected abstract void prepareControls()
Pre-fill any child-class-unique controls with passed-in data, and set any keystroke listeners...


sizeControls

protected abstract void sizeControls(Composite composite_prompts,
                                     int nbrColumns)
Adjust the size of any child-class-unique controls...


getCommandStart

protected abstract String getCommandStart()
Return the start of the command. Eg "CRTDTAQ DTAQ("


buildCommandStringDelta

protected abstract String buildCommandStringDelta()
For child subclasses. Build the command string for the additional parameters not handled by the base class.


performFinishValidation

protected abstract Control performFinishValidation()
Do validation beyond what the base class does, when Finish is pressed. Return the control to set focus to if any error is found. Also, set the errorMessage instance variable if an error is found. Further, set any newXXX instance variables you want to access via getXXX methods after successful finish.


internalIsPageComplete

protected abstract boolean internalIsPageComplete()
Do page completion testing beyond what the base class does. Return true if it is ok to enable Finish.


Rational Developer for Power Systems Software
V7.6

Copyright 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.