|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.adventnet.utils.tl1.TL1Utils
public class TL1Utils
This class acts as the Utility class for the intrumentation level of the TL1 Agent.
| Field Summary | |
|---|---|
static int |
DEBUG
Constant for "Debug" debug messages |
static int |
DISABLE
Constant for "Disable" debugging. |
static int |
ERROR
Constant for "Error" debug messages |
static int |
FATAL
Constant for "Fatal" debug messages. |
static int |
INFO
Constant for "Info" debug messages |
static int |
TRACE
Constant for "Trace" debug messages |
static int |
WARN
Constant for "Warn" debug messages |
| Constructor Summary | |
|---|---|
TL1Utils()
NoArg constructor, currently does nothing. |
|
| Method Summary | |
|---|---|
static boolean |
containsValidAidSeparator(java.lang.String str)
This method is used to check whether a String contains any one of the valid AID separators. |
static java.lang.Object |
convertStringToObject(java.lang.String type,
java.lang.String value)
Converts the String value to Object of type specified in this methods parameter. |
static void |
debugPrint(int agentDebugLevel,
int messageDebugLevel,
java.lang.String message)
This method is used to print the debug messages according to the Debug level. |
static java.lang.String |
findReplace(java.lang.String str,
java.lang.String find,
java.lang.String replace)
This method replaces all occurences of the String find in String str with String replace. |
static java.util.Vector |
getAidElements(java.util.Vector aid,
java.lang.String[] separators)
This method is used to seperate the elements in the AID of a TL1 Input message. |
static java.lang.String |
getCurrentDateAndTime()
This method returns the date and time in a string format. |
static long |
getTotalSeconds(int i)
This method returns the total number of seconds from January 1970 to the number of days given as parameter from current date. |
static boolean |
isContainsDigit(java.lang.String text)
This method determines whether any digit is present in a given String. |
static boolean |
isContainsLetter(java.lang.String text)
This method determines whether any Letter is present in a given String. |
static java.util.Hashtable |
splitNameDefinedObjects(java.util.Vector vec)
Used to seperate name defined values. |
static java.lang.String |
stringFirstCharToLower(java.lang.String toChange)
Converts the first character of a string to LowerCase character. |
static java.lang.String |
stringFirstCharToUpper(java.lang.String toChange)
Converts the first character of a string to UpperCase character. |
static boolean |
validateRequest(java.util.Vector[] values,
java.lang.String[][] types)
This method is used to validate the message payload block. |
static boolean |
validDateTimeCheck(TL1Time time,
TL1Date date)
This method is used to verify wheather the TL1Time and TL1Date are of the correct format.If the condition is satisfied ,returns true. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TRACE
public static final int INFO
public static final int DEBUG
public static final int WARN
public static final int ERROR
public static final int FATAL
public static final int DISABLE
| Constructor Detail |
|---|
public TL1Utils()
| Method Detail |
|---|
public static java.lang.Object convertStringToObject(java.lang.String type,
java.lang.String value)
throws java.lang.Exception
type - the type of the object to be returned.value - the value from which the returned object is derived.
java.lang.Exception - when forming the object with the given value fails.
public static java.util.Vector getAidElements(java.util.Vector aid,
java.lang.String[] separators)
throws java.lang.StringIndexOutOfBoundsException
aid - The Vector of TL1Param objects in the AID.separators - An array of separators used in the AID.
java.lang.StringIndexOutOfBoundsExceptionpublic static boolean containsValidAidSeparator(java.lang.String str)
str - The input String to check
public static boolean validateRequest(java.util.Vector[] values,
java.lang.String[][] types)
values - The request Values as a vector array.types - The types as a String double-dimension array.
public static void debugPrint(int agentDebugLevel,
int messageDebugLevel,
java.lang.String message)
agentDebugLevel - The debug level set in the agent.messageDebugLevel - The debug level of the debug message.message - The debug message.public static java.lang.String stringFirstCharToUpper(java.lang.String toChange)
toChange - string to convert
public static java.lang.String stringFirstCharToLower(java.lang.String toChange)
toChange - string to convert
public static boolean isContainsDigit(java.lang.String text)
text - The String which has to be checked whether any digit is present.
public static boolean isContainsLetter(java.lang.String text)
text - The String which has to be checked whether any letter is present.
public static java.lang.String findReplace(java.lang.String str,
java.lang.String find,
java.lang.String replace)
str - - original String.find - - String to find.replace - - String to replace.
public static boolean validDateTimeCheck(TL1Time time,
TL1Date date)
time - -TL1Timedate - -TL1Datepublic static long getTotalSeconds(int i)
days- - the number of days.public static java.lang.String getCurrentDateAndTime()
public static java.util.Hashtable splitNameDefinedObjects(java.util.Vector vec)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||