|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.etools.iseries.rse.util.clprompter.CLPrompter
public class CLPrompter
This object displays a prompter for a given command string similar
to the prompting done by the AS/400 command line. The command string
may be a command name, a full command string, or a partial command name
such as crt*. Any errors encountered during prompting will be handled
by the CLPrompter. The prompter requires the AS/400 system to be
at release V4R4 or later.
Usage:
AS400 system = new AS400("system1"); CLPrompter cp = new CLPrompter(frame, system, "savlib");
if(cp.showDialog() == CLPrompter.OK) { result = cp.getCommandString(); // get command string }
Nested Class Summary | |
---|---|
protected class |
CLPrompter.RunnableConfigure
|
Field Summary | |
---|---|
static int |
CANCEL
The user dismissed the dialog by pressing the Cancel button. |
static String |
Copyright
|
static int |
DATE_DAY_MONTH_YEAR
Constant specifying the date format is day, month, and year. |
static int |
DATE_JULIAN
Constant specifying the date format is Julian. |
static int |
DATE_MONTH_DAY_YEAR
Constant specifying the date format is month, day, and year. |
static int |
DATE_NONE
Constant specifying a date format was not used by the command. |
static int |
DATE_YEAR_MONTH_DAY
Constant specifying the date format is year, month, and day. |
static int |
EDIT_MODE
Indicates that the prompter should use edit mode: Label and Comment fields are displayed Variables are allowed Expressions are allowed |
static int |
ERROR
The dialog was dismissed due to an error during prompting. |
static int |
EXECUTE_MODE
Indicates that the prompter should use execute mode: Label and Comment fields are NOT displayed Variables are NOT allowed Expressions are NOT allowed |
protected static int |
NESTED_EDIT_MODE
Indicates that the prompter should use edit mode: Label and Comment fields are NOT displayed Variables are allowed Expressions are allowed |
static int |
NON_EXECUTE_MODE
Indicates that the prompter should use edit mode: Label and Comment fields are NOT displayed Variables are allowed Expressions are NOT allowed |
static int |
OK
The user dismissed the dialog by pressing the OK button. |
static int |
PTF_REQUIRED
The host system requires a PTF for the prompter to function. |
Constructor Summary | |
---|---|
CLPrompter()
Constructs a CLPrompter object. |
|
CLPrompter(Shell parentShell,
IBMiConnection system,
String commandString)
Constructs a CLPrompter object. |
|
CLPrompter(Shell parentShell,
IBMiConnection system,
String commandString,
boolean usePromptPrograms,
boolean promptInteractiveCommands)
Constructs a CLPrompter object. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener to be notified when the value of any bound property changes. |
void |
addVetoableChangeListener(VetoableChangeListener listener)
Adds a listener to be notified when the value of any constrained property changes. |
String |
getCommandString()
Returns the prompted command string. |
IBMiConnection |
getConnection()
Returns the connection used by this dialog. |
int |
getDateFormat()
Returns the date format used during prompting. |
SystemMessage |
getHelp()
Show the help window for the command without prompting. |
String |
getHelpURL()
Retrieves the URL for the help XML file |
Shell |
getParent()
Returns the parent Frame for the CLPrompter dialog. |
boolean |
getPromptInteractiveCommands()
Gets whether the CLPrompter should prompt interactive commands in addition to batch commands. |
boolean |
getUsePromptPrograms()
Returns if the prompter should call the prompt override and change exit programs. |
boolean |
isBatch()
Returns if the command prompted could be executed in batch. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a property change listener. |
void |
removeVetoableChangeListener(VetoableChangeListener listener)
Removes a vetoable change listener. |
void |
setCCSID(int ccsid)
|
void |
setCommandString(String commandString)
Sets the command string to be prompted. |
void |
setConnection(IBMiConnection connection)
Sets the iSeries connection used to retrieve the command definition. |
void |
setMode(int mode)
Sets the mode that the editor should use. |
void |
setParent(Shell parent)
Sets the parent shell for the CLPrompter dialog. |
void |
setPromptInteractiveCommands(boolean prompt)
Sets whether the prompter should prompt interactive commands in addition to batch commands. |
void |
setUsePromptPrograms(boolean usePromptPrograms)
Sets whether the prompter should call the prompt override and change exit programs for the command. |
int |
showDialog()
Shows the dialog and returns how it was dismissed. |
SystemMessage |
showHelp()
Show the help window for the command without prompting. |
SystemMessage |
testSyntax()
|
String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String Copyright
public static final int OK
public static final int CANCEL
public static final int ERROR
public static final int PTF_REQUIRED
public static final int DATE_NONE
public static final int DATE_DAY_MONTH_YEAR
public static final int DATE_JULIAN
public static final int DATE_MONTH_DAY_YEAR
public static final int DATE_YEAR_MONTH_DAY
public static final int EDIT_MODE
public static final int EXECUTE_MODE
public static final int NON_EXECUTE_MODE
protected static final int NESTED_EDIT_MODE
Constructor Detail |
---|
public CLPrompter() throws SystemMessageException
CLPrompter
object.
SystemMessageException
public CLPrompter(Shell parentShell, IBMiConnection system, String commandString) throws SystemMessageException
CLPrompter
object.
parent
- The parent Frame that displays the dialog.system
- The ISeriesConnection used to retrieve the command definition.commandString
- The command string to be prompted.
SystemMessageException
public CLPrompter(Shell parentShell, IBMiConnection system, String commandString, boolean usePromptPrograms, boolean promptInteractiveCommands) throws SystemMessageException
CLPrompter
object.
parent
- The parent Frame that displays the dialog.system
- The AS/400 system used to retrieve the command definition.commandString
- The command string to be prompted.usePromptPrograms
- If the prompt override and change exit programs should be called for the command.promptInteractiveCommands
- If the prompter should prompt interactive commands.
SystemMessageException
Method Detail |
---|
public void addPropertyChangeListener(PropertyChangeListener listener)
public void addVetoableChangeListener(VetoableChangeListener listener)
public String getCommandString()
public int getDateFormat()
public Shell getParent()
public boolean getPromptInteractiveCommands()
setPromptInteractiveCommands(boolean)
public IBMiConnection getConnection()
public boolean getUsePromptPrograms()
setUsePromptPrograms(boolean)
public boolean isBatch()
public void removePropertyChangeListener(PropertyChangeListener listener)
public void removeVetoableChangeListener(VetoableChangeListener listener)
public void setCommandString(String commandString)
command
- The command string to be prompted.public void setParent(Shell parent)
parent
- The parent shell for the CLPrompter dialog.public void setPromptInteractiveCommands(boolean prompt) throws PropertyVetoException
prompt
- Specifies if the prompter should also prompt interactive commands.
PropertyVetoException
getPromptInteractiveCommands()
public void setConnection(IBMiConnection connection)
connection
- The connection to use to retrieve the command definition.public void setUsePromptPrograms(boolean usePromptPrograms) throws PropertyVetoException
usePromptPrograms
- true to allow the prompt override and change exit programs to be
called for the command, false otherwise.
PropertyVetoException
getUsePromptPrograms()
public int showDialog()
OK
,
CANCEL
,
ERROR
,
PTF_REQUIRED
public SystemMessage showHelp()
OK
,
ERROR
,
PTF_REQUIRED
public String getHelpURL() throws SystemMessageException
SystemMessageException
public SystemMessage getHelp()
OK
,
ERROR
,
PTF_REQUIRED
public String toString()
toString
in class Object
public SystemMessage testSyntax()
public void setCCSID(int ccsid)
public void setMode(int mode)
mode
- One of the following: EDIT_MODE, EXECUTE_MODE, NON_EXECUTE_MODE
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |