Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.subsystems.qsys.prompter
Class ClUtilities

java.lang.Object
  extended by com.ibm.etools.iseries.subsystems.qsys.prompter.ClUtilities

public class ClUtilities
extends Object

Common CL Utilities that can be used by anyone

Since:
6.0

Field Summary
static String Copyright
           
static int ISERIES_CL
           
static int ISERIES_CLLE
           
static int ISERIES_CLP
           
static int ISERIES_CMD
           
static int ISERIES_UNKNOWN_FILE
           
static String PROCESSING_INDICATOR
           
 
Constructor Summary
ClUtilities()
           
 
Method Summary
static void addHiddenParameter(String command, String parameter, int positional)
          Add the property for a hidden parameter for a command.
static String getCommandStringWithoutHiddenParameters(String commandString)
          Retrieves the command string without hidden parameters (for use with commands list CRTUSRPRF that have parameters like PASSWORD)
static String getCommandWithoutBatchProcessingCharacters(String command)
          retrieves the command without the batch processing characters
static String getCommandWithoutComments(String command, StringBuffer strbComment, boolean ignoreErrors)
          Retrieves a command string without comments
static String getCommandWithoutLabel(String command, StringBuffer strbLabel)
          retrieves the command string without the label.
static String getCommandWithoutLabel(String command, StringBuffer strbLabel, boolean withColon, boolean ignoreErrors)
          retrieves the command without the label
static SystemMessage getMessage(String messageText, String messageDetails, String messageId)
           
static boolean hasBatchProcessingIndicator(String command)
          returns whether or not a command string has batch processing characters
 
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

ISERIES_UNKNOWN_FILE

public static final int ISERIES_UNKNOWN_FILE
See Also:
Constant Field Values

ISERIES_CL

public static final int ISERIES_CL
See Also:
Constant Field Values

ISERIES_CLLE

public static final int ISERIES_CLLE
See Also:
Constant Field Values

ISERIES_CLP

public static final int ISERIES_CLP
See Also:
Constant Field Values

ISERIES_CMD

public static final int ISERIES_CMD
See Also:
Constant Field Values

PROCESSING_INDICATOR

public static final String PROCESSING_INDICATOR
See Also:
Constant Field Values
Constructor Detail

ClUtilities

public ClUtilities()
Method Detail

getCommandWithoutLabel

public static String getCommandWithoutLabel(String command,
                                            StringBuffer strbLabel)
                                     throws ClParseException
retrieves the command string without the label. The label is returned without the colons, and errors trigger an exception.

Parameters:
command - the command to parse
strbLabel - the returned label string buffer without the colon
Returns:
the command string without the label
Throws:
ClParseException - If there is an error parsing the label for the command, this exception is thrown.
Since:
6.0

getCommandWithoutLabel

public static String getCommandWithoutLabel(String command,
                                            StringBuffer strbLabel,
                                            boolean withColon,
                                            boolean ignoreErrors)
                                     throws ClParseException
retrieves the command without the label

Parameters:
command - the command to parse
strbLabel - the string buffer to return the label string
withColon - true if you want the colon returned as part of the label string, false otherwise
ignoreErrors - true if you don't want exceptions thrown, false if you want to ignore errors and continue with processing
Returns:
the command without the label.
Throws:
ClParseException - If there is an error parsing the label for the command, this exception is thrown.
Since:
6.0

hasBatchProcessingIndicator

public static boolean hasBatchProcessingIndicator(String command)
returns whether or not a command string has batch processing characters

Parameters:
command - the command to parse
Returns:
true if the command starts with the batch processing characters, false otherwise.
Since:
6.0

getCommandWithoutBatchProcessingCharacters

public static String getCommandWithoutBatchProcessingCharacters(String command)
retrieves the command without the batch processing characters

Parameters:
command - the command string to parse
Returns:
the command without the batch processing string
Since:
6.0

getCommandWithoutComments

public static String getCommandWithoutComments(String command,
                                               StringBuffer strbComment,
                                               boolean ignoreErrors)
                                        throws ClParseException
Retrieves a command string without comments

Parameters:
command - the command string to parse
strbComment - the string buffer to return the comment string
ignoreErrors - truw if you want to ignore errors and do not want exceptions thrown
Returns:
the command string without any comments embedded within it
Throws:
ClParseException - If there is an error encountered when parsing the command string, this exception will be thrown.
Since:
6.0

getCommandStringWithoutHiddenParameters

public static String getCommandStringWithoutHiddenParameters(String commandString)
Retrieves the command string without hidden parameters (for use with commands list CRTUSRPRF that have parameters like PASSWORD)

Parameters:
commandString - The string with the hidden parameters
Returns:
The string without the hidden parameters
Since:
7.0

addHiddenParameter

public static void addHiddenParameter(String command,
                                      String parameter,
                                      int positional)
Add the property for a hidden parameter for a command. This is called when prompting a command, and used to hide these parameters in the iseries commands log view

Parameters:
command - the command to add a hidden parameter for
parameter - the parameter which should be hidden
positional - the positional value of the parameter, 0 if the paramter is not eligeabl as a positional parameter
Since:
7.0

getMessage

public static SystemMessage getMessage(String messageText,
                                       String messageDetails,
                                       String messageId)

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.