|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.as400.access.CommandList
public class CommandList extends Object implements Serializable
The CommandList class represents a list of CL command (*CMD) objects on the system. This class allows the user to retrieve
a list of Command objects which can then be
used to retrieve information about each individual CL command in the list.
The following example demonstrates the use of CommandList:
AS400 system = new AS400("mySystem");
// Generate a list of commands that start with "CRT".
CommandList list = new CommandList(system, "QSYS", "CRT*");
try
{
Command[] cmdList = list.generateList();
}
catch (Exception e)
{
e.printStackTrace();
}
Command,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static String |
ALL
Constant used to retrieve all commands in a given library. |
| Constructor and Description |
|---|
CommandList()
Constructs a CommandList object. |
CommandList(AS400 system,
String library,
String command)
Constructs a CommandList object. |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener. |
Command[] |
generateList()
Generate a list of commands. |
String |
getCommand()
Returns the command name used to generate a list for. |
String |
getLibrary()
Returns the library where the command(s) reside. |
AS400 |
getSystem()
Returns the system from which to retrieve the command list. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes the PropertyChangeListener. |
void |
setCommand(String command)
Sets the command name filter used to generate the list. |
void |
setLibrary(String library)
Sets the library where the command(s) reside. |
void |
setSystem(AS400 system)
Sets the system from which to retrieve the command list. |
String |
toString()
Returns a String representation of this CommandList. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String ALL
| Constructor Detail |
|---|
public CommandList()
public CommandList(AS400 system,
String library,
String command)
system - The system on which the commands resides.library - The library in which the commands resides, e.g. "QSYS".command - The name of a command or list of commands, e.g. "CRTUSRPRF" or "CRT*". Wildcards or the CommandList.ALL constant can be used.| Method Detail |
|---|
public void addPropertyChangeListener(PropertyChangeListener listener)
listener - The PropertyChangeListener.public String getCommand()
setCommand(java.lang.String)public String getLibrary()
setLibrary(java.lang.String)public AS400 getSystem()
setSystem(com.ibm.as400.access.AS400)
public Command[] generateList()
throws AS400Exception,
AS400SecurityException,
ErrorCompletingRequestException,
IOException,
InterruptedException,
ObjectDoesNotExistException
AS400ExceptionAS400SecurityExceptionErrorCompletingRequestExceptionIOExceptionInterruptedExceptionObjectDoesNotExistExceptionsetCommand(java.lang.String),
setLibrary(java.lang.String),
setSystem(com.ibm.as400.access.AS400)public void removePropertyChangeListener(PropertyChangeListener listener)
listener - The PropertyChangeListener.public void setCommand(String command)
command - The command(s) for which to generate a list.getCommand()public void setLibrary(String library)
library - The library where the command(s) reside.getLibrary()public void setSystem(AS400 system)
system - The system from which to retrieve the commands.getSystem()public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||