Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.rse.ui.actions.select
Class QSYSSelectJobAction

java.lang.Object
  extended by SystemBaseDialogAction
      extended by com.ibm.etools.iseries.rse.ui.actions.select.QSYSSelectJobAction

public class QSYSSelectJobAction
extends SystemBaseDialogAction

A reusable dialog for prompting for an object on a remote iSeries system.

This dialog offers a tree view for selecting the iSeries jobs


     Browse for job
                                   
     .--------------------------------------.
     | Conn1                                |
     | - Job(1)                             |
     | - Job(2)                             |
     |   ....                               |
     |   ....                               |
     |   ....                               |
     | - Job(n)                             |
     .--------------------------------------.
 
 

To configure the dialog, call these input methods:

To override the default prompt labels and tooltip text, call these input methods:

After running, call these methods to get the output:


Field Summary
protected  IBMiConnection connection
           
static String copyright
           
protected static IQSYSJob[] EMPTY_JOB_ARRAY
           
protected static String[] EMPTY_STRING_ARRAY
           
protected  String jobFilterString
           
protected  boolean multipleSelectionMode
           
protected  String preSelectObjectName
           
protected  int selectionType
           
protected  QSYSSelectJobDialog selectJobDialog
           
protected  boolean showJobListOnStartup
           
protected  String title
           
protected  String treeTip
           
protected  String verbage
           
 
Constructor Summary
QSYSSelectJobAction(Shell shell, String title, String tooltip, IBMiConnection connection, int selectionType)
          Base constructor used by child classes, to supply their own action label.
 
Method Summary
protected  Dialog createDialog(Shell shell)
          If you decide to use the supplied run method as is, then you must override this method to create and return the dialog that is displayed by the default run method implementation.
 IBMiConnection getConnection()
          Getter method for connection
protected  Object getDialogValue(Dialog dialog)
          Required by parent.
 IQSYSJob getSelectedObject()
          Return selected AS400 object.
 IQSYSJob[] getSelectedObjects()
          Return all selected objects.
protected  QSYSSelectJobDialog getSelectJobDialog(Shell shell)
          This is the overridable point for the dialog.
 void reset()
          Reset all attributes to initial values.
 void setConnection(IBMiConnection connection)
          Set the system connection to use.
 void setDialogTitle(String title)
          Set the dialog title.
 void setJobFilterString(String filterString)
          Add a string filter to select a list of jobs to display
 void setMessage(String message)
          Set the message shown at the top.
 void setMultipleSelectionMode(boolean multiple)
          Set multiple selection mode.
 void setSelectionTreeToolTipText(String tip)
          Set the tooltip text for the remote systems tree from which an item is selected.
 void setSelectionValidator(IValidatorRemoteSelection selectionValidator)
          Specify a validator to use when the user selects a remote object This allows you to decide if OK should be enabled or not for that remote object.
 void setShowJobListOnStartup(boolean show)
          Set to false if don't want to see the list of job for the specified job filter string as soon as the dialog comes up.
 
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

selectionType

protected int selectionType

selectJobDialog

protected QSYSSelectJobDialog selectJobDialog

connection

protected IBMiConnection connection

jobFilterString

protected String jobFilterString

title

protected String title

verbage

protected String verbage

treeTip

protected String treeTip

preSelectObjectName

protected String preSelectObjectName

showJobListOnStartup

protected boolean showJobListOnStartup

multipleSelectionMode

protected boolean multipleSelectionMode

EMPTY_JOB_ARRAY

protected static final IQSYSJob[] EMPTY_JOB_ARRAY

EMPTY_STRING_ARRAY

protected static final String[] EMPTY_STRING_ARRAY
Constructor Detail

QSYSSelectJobAction

public QSYSSelectJobAction(Shell shell,
                           String title,
                           String tooltip,
                           IBMiConnection connection,
                           int selectionType)
Base constructor used by child classes, to supply their own action label.

Method Detail

setConnection

public void setConnection(IBMiConnection connection)
Set the system connection to use.


setShowJobListOnStartup

public void setShowJobListOnStartup(boolean show)
Set to false if don't want to see the list of job for the specified job filter string as soon as the dialog comes up. Default value is true


setJobFilterString

public void setJobFilterString(String filterString)
Add a string filter to select a list of jobs to display

This is really a filter string versus a filter, but it is realized in the GUI as a temporary filter.


setMultipleSelectionMode

public void setMultipleSelectionMode(boolean multiple)
Set multiple selection mode. Default is single selection only.

If you set this to true you must use getSelectedObjects()

Further, if you turn this on, it has the side effect of allowing the user to select any remote object. The assumption being if you are prompting for children, you also want to allow the user to select a parent, with the meaning being that all children within the parent are implicitly selected.

To restrict what types of objects can be selected, use #setSelectionValidator(com.ibm.etools.systems.core.ui.IValidatorRemoteSelection)


setSelectionValidator

public void setSelectionValidator(IValidatorRemoteSelection selectionValidator)
Specify a validator to use when the user selects a remote object This allows you to decide if OK should be enabled or not for that remote object.


reset

public void reset()
Reset all attributes to initial values. Useful when reusing an action object


setDialogTitle

public void setDialogTitle(String title)
Set the dialog title. Must be called prior to run().


setMessage

public void setMessage(String message)
Set the message shown at the top. Default is "Browse for library"


setSelectionTreeToolTipText

public void setSelectionTreeToolTipText(String tip)
Set the tooltip text for the remote systems tree from which an item is selected.


getSelectedObjects

public IQSYSJob[] getSelectedObjects()
Return all selected objects. This method will return an array of one unless you have called setMultipleSelectionMode(true)!

It will always return null if the user cancelled the dialog.

See Also:
setMultipleSelectionMode(boolean)

getSelectedObject

public IQSYSJob getSelectedObject()
Return selected AS400 object. If multiple objects are selected, returns the first selected object.


getConnection

public IBMiConnection getConnection()
Getter method for connection


createDialog

protected Dialog createDialog(Shell shell)
If you decide to use the supplied run method as is, then you must override this method to create and return the dialog that is displayed by the default run method implementation.

If you override run with your own, then simply implement this to return null as it won't be used.

See Also:
#run()

getSelectJobDialog

protected QSYSSelectJobDialog getSelectJobDialog(Shell shell)
This is the overridable point for the dialog.


getDialogValue

protected Object getDialogValue(Dialog dialog)
Required by parent.


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.