com.ibm.wsspi.rasdiag

Class DiagnosticTypedValue

  1. java.lang.Object
  2. extended bycom.ibm.wsspi.rasdiag.DiagnosticTypedValue

  1. public class DiagnosticTypedValue
  2. extends java.lang.Object
Special class for storing typed data in the HashMaps used by DiagnosticProviders. The HashMaps DiagnosticProviders create have keys that are Strings and values that can be: This allows flexibility in content delivered.

Field Summary

Modifier and Type Field and Description
  1. static
  2. short
MAXTYPECONST
  1. static
  2. java.lang.String[]
sTypeNames
  1. java.lang.String
tvMsgKey
localization message key representing the label for this value
  1. java.lang.String
tvString
string representation of value
  1. short
tvType
type being held in this DTV object
  1. static
  2. short
TYPEBOOLEAN
boolean primitive type
  1. static
  2. short
TYPECOLLECTIONEL
Collection type
  1. static
  2. short
TYPEDATE
Date type
  1. static
  2. short
TYPEDOUBLE
double primitive type
  1. static
  2. short
TYPEINT
int primitive type
  1. static
  2. short
TYPELONG
long primitive type
  1. static
  2. short
TYPESHORT
short primitive type
  1. static
  2. short
TYPESTRING
String type

Constructor Summary

Constructor and Description
DiagnosticTypedValue()
constructs the class with no parms.
DiagnosticTypedValue(boolean aBoolVal,java.lang.String aMsgKey)
constructs an object with a boolean value (Helper constructor)
DiagnosticTypedValue(java.util.Date aDateVal,java.lang.String aMsgKey)
constructs an object with a date object (Helper constructor)
DiagnosticTypedValue(double aDoubleVal,java.lang.String aMsgKey)
constructs an object with a dobule value (Helper constructor)
DiagnosticTypedValue(int aIntVal,java.lang.String aMsgKey)
constructs an object with an int value (Helper constructor)
DiagnosticTypedValue(long aLongVal,java.lang.String aMsgKey)
constructs an object with a long value (Helper constructor)
DiagnosticTypedValue(short aShortVal,java.lang.String aMsgKey)
constructs an object with a short value (Helper constructor)
DiagnosticTypedValue(java.lang.String aStringVal,java.lang.String aMsgKey)
constructs an object with a String value (Helper constructor)

Method Summary

Modifier and Type Method and Description
  1. static
  2. void
addCollectionToHashMap(java.util.HashMap aDest,java.lang.String aId,java.util.Collection aData,java.lang.String aMsgKey)
adds a collection into the passed in HashMap.
  1. static
  2. void
addCollectionToHashMap(java.util.HashMap aDest,java.lang.String aId,java.util.Collection aData,java.lang.String aMsgKey,short collectionType)
adds a collection into the passed in HashMap.
  1. static
  2. void
addHashMap(java.util.HashMap parentHashMap,java.util.HashMap childHashMap,java.lang.String childName)
add a child Hashmap to a parent Hashmap and give it a name (static Helper method) This is equivalent to calling parentHashMap.put(childName, childHashMap)
  1. static
  2. DiagnosticTypedValue
fromString(java.lang.String aDiagType)
deserialize a string back into this object
  1. java.lang.String
toString()
convert the object to a string with a colon separated type:value pair
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

TYPESHORT

  1. public static final short TYPESHORT
short primitive type
See Also:

TYPEINT

  1. public static final short TYPEINT
int primitive type
See Also:

TYPEBOOLEAN

  1. public static final short TYPEBOOLEAN
boolean primitive type
See Also:

TYPEDOUBLE

  1. public static final short TYPEDOUBLE
double primitive type
See Also:

TYPELONG

  1. public static final short TYPELONG
long primitive type
See Also:

TYPESTRING

  1. public static final short TYPESTRING
String type
See Also:

TYPEDATE

  1. public static final short TYPEDATE
Date type
See Also:

TYPECOLLECTIONEL

  1. public static final short TYPECOLLECTIONEL
Collection type
See Also:

MAXTYPECONST

  1. public static final short MAXTYPECONST
See Also:

sTypeNames

  1. public static final java.lang.String[] sTypeNames

tvType

  1. public short tvType
type being held in this DTV object

tvString

  1. public java.lang.String tvString
string representation of value

tvMsgKey

  1. public java.lang.String tvMsgKey
localization message key representing the label for this value

Constructor Detail

DiagnosticTypedValue

  1. public DiagnosticTypedValue()
constructs the class with no parms. Since member fields are public, they can be updated directly. This allows construction by the caller

DiagnosticTypedValue

  1. public DiagnosticTypedValue(short aShortVal,
  2. java.lang.String aMsgKey)
constructs an object with a short value (Helper constructor)
Parameters:
aShortVal - value to be typed/stored

DiagnosticTypedValue

  1. public DiagnosticTypedValue(int aIntVal,
  2. java.lang.String aMsgKey)
constructs an object with an int value (Helper constructor)
Parameters:
aIntVal - value to be typed/stored

DiagnosticTypedValue

  1. public DiagnosticTypedValue(boolean aBoolVal,
  2. java.lang.String aMsgKey)
constructs an object with a boolean value (Helper constructor)
Parameters:
aBoolVal - value to be typed/stored

DiagnosticTypedValue

  1. public DiagnosticTypedValue(double aDoubleVal,
  2. java.lang.String aMsgKey)
constructs an object with a dobule value (Helper constructor)
Parameters:
aDoubleVal - value to be typed/stored

DiagnosticTypedValue

  1. public DiagnosticTypedValue(long aLongVal,
  2. java.lang.String aMsgKey)
constructs an object with a long value (Helper constructor)
Parameters:
aLongVal - value to be typed/stored

DiagnosticTypedValue

  1. public DiagnosticTypedValue(java.lang.String aStringVal,
  2. java.lang.String aMsgKey)
constructs an object with a String value (Helper constructor)
Parameters:
aStringVal - value to be typed/stored

DiagnosticTypedValue

  1. public DiagnosticTypedValue(java.util.Date aDateVal,
  2. java.lang.String aMsgKey)
constructs an object with a date object (Helper constructor)
Parameters:
aDateVal - value to be typed/stored

Method Detail

toString

  1. public java.lang.String toString( )
convert the object to a string with a colon separated type:value pair
Overrides:
toString in class java.lang.Object
Returns:
String representing the object. If tvType is invalid, returns null.

fromString

  1. public static DiagnosticTypedValue fromString( java.lang.String aDiagType)
deserialize a string back into this object
Parameters:
aDiagType - String representation of the object (from toString())
Returns:
DiagnosticTypedValue instance from the string

addCollectionToHashMap

  1. public static void addCollectionToHashMap( java.util.HashMap aDest,
  2. java.lang.String aId,
  3. java.util.Collection aData,
  4. java.lang.String aMsgKey)
adds a collection into the passed in HashMap. It creates multiple DiagnosticTypedValue entries in the HashMap with the id suffixed by a sequence number. The same MsgKey is used for all as they are assumed to be the same type of data.
Parameters:
aDest - Destination HashMap into which all of the entries in the collection will be added
aId - Id/Name of the collection which will be suffixed by a sequence number and used as the HashMap key collection as the type of data which is stored in the DiagnosticTypedValue
aData - Actual collection containing the data (or something subclassed off of collection)
aMsgKey - Key into a Resource Bundle for localizing the label

addCollectionToHashMap

  1. public static void addCollectionToHashMap( java.util.HashMap aDest,
  2. java.lang.String aId,
  3. java.util.Collection aData,
  4. java.lang.String aMsgKey,
  5. short collectionType)
adds a collection into the passed in HashMap. It creates multiple DiagnosticTypedValue entries in the HashMap with the id suffixed by a sequence number. The same MsgKey is used for all as they are assumed to be the same type of data.
Parameters:
aDest - Destination HashMap into which all of the entries in the collection will be added
aId - Id/Name of the collection which will be suffixed by a sequence number and used as the HashMap key collection as the type of data which is stored in the DiagnosticTypedValue
aData - Actual collection containing the data (or something subclassed off of collection)
aMsgKey - Key into a Resource Bundle for localizing the label
collectionType - the type of each object in the collection (should be specified from the TYPE* constants in this file). If not valid, String will be used.

addHashMap

  1. public static void addHashMap(java.util.HashMap parentHashMap,
  2. java.util.HashMap childHashMap,
  3. java.lang.String childName)
add a child Hashmap to a parent Hashmap and give it a name (static Helper method) This is equivalent to calling parentHashMap.put(childName, childHashMap)
Parameters:
parentHashMap - Parent HashMap, will contain Child HashMap
childHashMap - Child HashMap to embed into Parent HashMap
childName - Name of Child HashMap for display