com.tivoli.twg.ServiceDesk
Class ServiceDeskUtil

java.lang.Object
  extended bycom.tivoli.twg.ServiceDesk.ServiceDeskUtil

public class ServiceDeskUtil
extends java.lang.Object

This utility class supports adding parameters to a command or reading parameters from a command.


Field Summary
static boolean INPUT_PARM
           
static boolean OUTPUT_PARM
           
 
Constructor Summary
ServiceDeskUtil()
           
 
Method Summary
static void addBooleanToCommand(Command cmd, boolean b)
          Add a boolean value to a command as an input parameter.
static void addBooleanToCommand(Command cmd, boolean b, boolean io)
          Add a boolean value to a command as an input or output parameter.
static void addDataValuesToCommand(Command cmd, java.lang.String name, DataValue[] values)
          Add Data Values to a command as an input parameter.
static void addDataValuesToCommand(Command cmd, java.lang.String name, DataValue[] values, boolean io)
          Add Data Values to a command as an input or output parameter.
static void addFindObjectArgumentsToCommand(Command cmd, java.util.Locale loc, java.lang.String objClass, boolean caseSensitive)
          Add Locale, Object Class and case sensitive flag to a command as an input parameter.
static void addFindObjectArgumentsToCommand(Command cmd, java.util.Locale loc, java.lang.String objClass, boolean caseSensitive, boolean io)
          Add Locale, Object Class and Case Sensitive flag to a command as an input or output parameter.
static void addIntToCommand(Command cmd, int i)
          Add an int to a command as an input parameter.
static void addIntToCommand(Command cmd, int i, boolean io)
          Add an integer to a command as an input or output parameter.
static void addLongToCommand(Command cmd, long l)
          Add a long to a command as an input parameter.
static void addLongToCommand(Command cmd, long l, boolean io)
          Add a long to a command as an input or output parameter.
static void addLongValueSetToCommand(Command cmd, LongValueSet lvs)
          Add a long value set to a command as an input parameter.
static void addLongValueSetToCommand(Command cmd, LongValueSet lvs, boolean io)
          Add a long value set to a command as an input or output parameter.
static void addNamedDataValueToCommand(Command cmd, java.lang.String name, DataValue value)
          Add Named Data Value to a command as an input parameter.
static void addNamedDataValueToCommand(Command cmd, java.lang.String name, DataValue value, boolean io)
          Add Named Data Value to a command as an input or output parameter.
static void addObjectIDsToCommand(Command cmd, java.lang.String id_list)
          Add Object IDs to a command as an input parameter.
static void addObjectIDsToCommand(Command cmd, java.lang.String id_list, boolean io)
          Add Object IDs to a command as an input or output parameter.
static void addStringToCommand(Command cmd, java.lang.String s)
          Add a string to a command as an input parameter.
static void addStringToCommand(Command cmd, java.lang.String s, boolean io)
          Add a string to a command as an input or output parameter.
static boolean readBooleanFromCommand(Command cmd, int index)
          Read a boolean from a command input parameter.
static boolean readBooleanFromCommand(Command cmd, int index, boolean io)
          Read a boolean from a command input or output parameter.
static DataValue[] readDataValuesFromCommand(Command cmd, int index)
          Read a data value list from a command input parameter.
static DataValue[] readDataValuesFromCommand(Command cmd, int index, boolean io)
          Read a data value list from a command input or output parameter.
static int readIntFromCommand(Command cmd, int index)
          Read an integer from a command input parameter.
static int readIntFromCommand(Command cmd, int index, boolean io)
          Read an integer from a command input or output parameter.
static long readLongFromCommand(Command cmd, int index)
          Read a long from a command input parameter.
static long readLongFromCommand(Command cmd, int index, boolean io)
          Read an long from a command input or output parameter.
static LongValueSet readLongValueSetFromCommand(Command cmd, int index)
          Read a long value set from a command input parameter.
static LongValueSet readLongValueSetFromCommand(Command cmd, int index, boolean io)
          Read a long value set from a command input or output parameter.
static DataValue readNamedDataValueFromCommand(Command cmd, int index, boolean io)
           
static DataValue readNamedDataValueFromnCommand(Command cmd, int index)
          Read the datavalue the was added by the call to addNamedDataValue.
static java.lang.String readStringFromCommand(Command cmd, int index)
          Read a string from a command input parameter.
static java.lang.String readStringFromCommand(Command cmd, int index, boolean io)
          Read a string from a command input or output parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INPUT_PARM

public static final boolean INPUT_PARM
See Also:
Constant Field Values

OUTPUT_PARM

public static final boolean OUTPUT_PARM
See Also:
Constant Field Values
Constructor Detail

ServiceDeskUtil

public ServiceDeskUtil()
Method Detail

addStringToCommand

public static void addStringToCommand(Command cmd,
                                      java.lang.String s,
                                      boolean io)
Add a string to a command as an input or output parameter.

Parameters:
cmd - - Command
s - - the string to add to the command
io - - specifies input or output parameter

addStringToCommand

public static void addStringToCommand(Command cmd,
                                      java.lang.String s)
Add a string to a command as an input parameter.

Parameters:
cmd - - Command
s - - the string to add to the command

addIntToCommand

public static void addIntToCommand(Command cmd,
                                   int i,
                                   boolean io)
Add an integer to a command as an input or output parameter.

Parameters:
cmd - - Command
i - - the integer to add to the command
io - - specifies input or output parameter

addIntToCommand

public static void addIntToCommand(Command cmd,
                                   int i)
Add an int to a command as an input parameter.

Parameters:
cmd - - Command
i - - the integer to add to the command

addLongToCommand

public static void addLongToCommand(Command cmd,
                                    long l,
                                    boolean io)
Add a long to a command as an input or output parameter.

Parameters:
cmd - - Command
l - - the long value to add to the command
io - - specifies input or output parameter

addLongToCommand

public static void addLongToCommand(Command cmd,
                                    long l)
Add a long to a command as an input parameter.

Parameters:
cmd - - Command
l - - the long value to add to the command

addLongValueSetToCommand

public static void addLongValueSetToCommand(Command cmd,
                                            LongValueSet lvs,
                                            boolean io)
Add a long value set to a command as an input or output parameter.

Parameters:
cmd - - Command
lvs - - the long value set to add to the command
io - - specifies input or output parameter

addLongValueSetToCommand

public static void addLongValueSetToCommand(Command cmd,
                                            LongValueSet lvs)
Add a long value set to a command as an input parameter.

Parameters:
cmd - - Command
lvs - - the long value set to add to the command

addBooleanToCommand

public static void addBooleanToCommand(Command cmd,
                                       boolean b,
                                       boolean io)
Add a boolean value to a command as an input or output parameter.

Parameters:
cmd - - Command
b - - the boolean value to add to the command
io - - specifies input or output parameter

addBooleanToCommand

public static void addBooleanToCommand(Command cmd,
                                       boolean b)
Add a boolean value to a command as an input parameter.

Parameters:
cmd - - Command
b - - the boolean value to add to the command

addDataValuesToCommand

public static void addDataValuesToCommand(Command cmd,
                                          java.lang.String name,
                                          DataValue[] values,
                                          boolean io)
Add Data Values to a command as an input or output parameter. The defined format is name, count (data value type, data value)s. The name is passed as a CompUnicode, the count is an integer, the type is a char, and DataValue.

Parameters:
cmd - - Command
name - - name associated with data value list
values - - array of data values.
io - - specifies input or output parameter

addDataValuesToCommand

public static void addDataValuesToCommand(Command cmd,
                                          java.lang.String name,
                                          DataValue[] values)
Add Data Values to a command as an input parameter. The defined format is name, count (data value type, data value)s. The name is passed as a CompUnicode, the count is an integer, the type is a char, and DataValue.

Parameters:
cmd - - Command
name - - name associated with data value list
values - - array of data values.

addFindObjectArgumentsToCommand

public static void addFindObjectArgumentsToCommand(Command cmd,
                                                   java.util.Locale loc,
                                                   java.lang.String objClass,
                                                   boolean caseSensitive,
                                                   boolean io)
Add Locale, Object Class and Case Sensitive flag to a command as an input or output parameter. The defined format is language, country, object class. case sensitive. The language is passed as a CompUnicode, the country is passed as CompUnicode, the object class is CompUnicode, and case sensitive is TWGBoolean This is a convenience method for the first parameter of the FIND_OBJECT_BY_ATTRIBUTE command.

Parameters:
cmd - - Command
loc - - Locale
objClass - - the object class
caseSensitive - - true is string compares should be case sensitive
io - - specifies input or output parameter

addFindObjectArgumentsToCommand

public static void addFindObjectArgumentsToCommand(Command cmd,
                                                   java.util.Locale loc,
                                                   java.lang.String objClass,
                                                   boolean caseSensitive)
Add Locale, Object Class and case sensitive flag to a command as an input parameter. The defined format is language, country, object class. case sensitive The language is passed as a CompUnicode, the country is passed as CompUnicode, the object class is CompUnicode. case sensitive is a TWGBoolean

Parameters:
cmd - - Command
loc - - Locale
caseSensitive - - true is string compares should be case sensitive
objClass - - the object class

addNamedDataValueToCommand

public static void addNamedDataValueToCommand(Command cmd,
                                              java.lang.String name,
                                              DataValue value,
                                              boolean io)
Add Named Data Value to a command as an input or output parameter. The defined format is name, data value. The name is passed as a CompUnicode, the type is a char, and DataValue.

Parameters:
cmd - - Command
name - - name associated with data value list
io - - specifies input or output parameter

addNamedDataValueToCommand

public static void addNamedDataValueToCommand(Command cmd,
                                              java.lang.String name,
                                              DataValue value)
Add Named Data Value to a command as an input parameter. The defined format is name, data value. The name is passed as a CompUnicode, the type is a char, and DataValue.

Parameters:
cmd - - Command
name - - name associated with data value list

addObjectIDsToCommand

public static void addObjectIDsToCommand(Command cmd,
                                         java.lang.String id_list,
                                         boolean io)
Add Object IDs to a command as an input or output parameter. The defined format is comma delimited object identifiers

Parameters:
cmd - - Command
id_list - - list of object identifiers to add
io - - specifies input or output parameter

addObjectIDsToCommand

public static void addObjectIDsToCommand(Command cmd,
                                         java.lang.String id_list)
Add Object IDs to a command as an input parameter. The defined format is comma delimited object identifiers

Parameters:
cmd - - Command
id_list - - list of object identifiers to add

readStringFromCommand

public static java.lang.String readStringFromCommand(Command cmd,
                                                     int index,
                                                     boolean io)
Read a string from a command input or output parameter.

Parameters:
cmd - - Command
index - - parameter index
io - - specifies input or output parameter
Returns:
string

readStringFromCommand

public static java.lang.String readStringFromCommand(Command cmd,
                                                     int index)
Read a string from a command input parameter.

Parameters:
cmd - - Command
index - - parameter index
Returns:
string

readIntFromCommand

public static int readIntFromCommand(Command cmd,
                                     int index,
                                     boolean io)
Read an integer from a command input or output parameter.

Parameters:
cmd - - Command
index - - parameter index
io - - specifies input or output parameter
Returns:
integer value

readIntFromCommand

public static int readIntFromCommand(Command cmd,
                                     int index)
Read an integer from a command input parameter.

Parameters:
cmd - - Command
index - - parameter index
Returns:
integer value

readLongFromCommand

public static long readLongFromCommand(Command cmd,
                                       int index,
                                       boolean io)
Read an long from a command input or output parameter.

Parameters:
cmd - - Command
index - - parameter index
io - - specifies input or output parameter
Returns:
long value

readLongFromCommand

public static long readLongFromCommand(Command cmd,
                                       int index)
Read a long from a command input parameter.

Parameters:
cmd - - Command
index - - parameter index
Returns:
long value

readBooleanFromCommand

public static boolean readBooleanFromCommand(Command cmd,
                                             int index,
                                             boolean io)
Read a boolean from a command input or output parameter.

Parameters:
cmd - - Command
index - - parameter index
io - - specifies input or output parameter
Returns:
boolean value

readBooleanFromCommand

public static boolean readBooleanFromCommand(Command cmd,
                                             int index)
Read a boolean from a command input parameter.

Parameters:
cmd - - Command
index - - parameter index
Returns:
boolean value

readDataValuesFromCommand

public static DataValue[] readDataValuesFromCommand(Command cmd,
                                                    int index,
                                                    boolean io)
Read a data value list from a command input or output parameter.

Parameters:
cmd - - Command
index - - parameter index
io - - specifies input or output parameter
Returns:
array of data values

readDataValuesFromCommand

public static DataValue[] readDataValuesFromCommand(Command cmd,
                                                    int index)
Read a data value list from a command input parameter.

Parameters:
cmd - - Command
index - - parameter index
Returns:
array of data values

readLongValueSetFromCommand

public static LongValueSet readLongValueSetFromCommand(Command cmd,
                                                       int index,
                                                       boolean io)
Read a long value set from a command input or output parameter.

Parameters:
cmd - - Command
index - - parameter index
io - - specifies input or output parameter
Returns:
long value set

readLongValueSetFromCommand

public static LongValueSet readLongValueSetFromCommand(Command cmd,
                                                       int index)
Read a long value set from a command input parameter.

Parameters:
cmd - - Command
index - - parameter index
Returns:
LongValueSet

readNamedDataValueFromnCommand

public static DataValue readNamedDataValueFromnCommand(Command cmd,
                                                       int index)
Read the datavalue the was added by the call to addNamedDataValue. THe name can be obtained by readStringFromCommand

Parameters:
cmd - - Command
index - - parameter index

readNamedDataValueFromCommand

public static DataValue readNamedDataValueFromCommand(Command cmd,
                                                      int index,
                                                      boolean io)