|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.cle.util.CLEUtil
Contains a number of frequently used, static utility methods for developers using the MVC Framework.
Field Summary | |
static java.lang.ThreadLocal |
sessionId
Use this for setting session id per current thread. |
Constructor Summary | |
CLEUtil()
|
Method Summary | |
static void |
appendEntryInLog(java.lang.String fileName,
java.lang.String entry)
Write to a log file specified for the file name with an entry passed in as a String |
double |
calculateStandardDeviation(java.util.Vector dataSet,
boolean sample)
Returns a Standard Deviation as a double value. |
java.lang.Object |
defaultInstanceForName(java.lang.String className)
Returns an instance for the specified classname. |
static java.lang.String |
fitString(java.lang.String aString,
int totalCells,
boolean padBeginning)
Fit the specified String into the specified number of cells. |
static java.lang.String |
floatArrayToString(float[] array)
Returns float Array as a String. |
static java.lang.String |
formatHashtable(java.util.Hashtable aTable)
|
static java.lang.Class |
forName(java.lang.Class scope,
java.lang.String className)
Load a class for the specified name and scope. |
static java.net.HttpURLConnection |
getDefaultURLConnection(java.lang.String strURL)
Returns the HttpURLConnection for the specified String or null if a connection could not be made. |
static java.io.InputStream |
getInputStream(java.lang.String fileOrUrlString,
java.lang.Class aRelativeClass)
Returns the InputStream for the specified file. |
static java.lang.Double |
getProcessInfoAsDouble(ProcessInfo info)
Return process info as Double. |
static double |
getProcessInfoAsDoubleValue(ProcessInfo info)
Return process info as doubleValue() |
static java.lang.Integer |
getProcessInfoAsInteger(ProcessInfo info)
Return process info as Integer. |
static java.lang.String |
getRandomString(int stringSize)
This returns a random generated string with the size specified as the lone parameter. |
static java.lang.Object |
getSessionId()
This method is used ConnectionManager, ConnectionProvider, DeploymentConnector to get a sessionId when a sessionId not specified by the user. |
static java.lang.String |
getUnicodeRepresentation(char charToConvert)
Converts a character to its unicode representation |
static java.lang.String |
getUniqueId(Service aService)
Used to name temp images uniquely for a servlet environment |
static java.lang.String |
getUnqualifiedClassName(java.lang.Class aClass)
Returns the name of a class with the package stripped from the front of the name. |
static java.lang.String |
getUnqualifiedClassName(java.lang.Object anObject)
Returns the name of an Object's class with the package stripped from the front of the name. |
static void |
main(java.lang.String[] args)
|
static java.util.Hashtable |
mergeHashtables(java.util.Vector vectorOfHashtables)
Takes two Hashtables and returns a merged result. |
java.util.Vector |
mergeVectors(java.util.Vector vectorOne,
java.util.Vector vectorTwo)
Merges the contents of vectorTwo into vectorOne |
static java.lang.String |
parseString(java.lang.String stringToParse,
java.lang.String parseString,
java.lang.String replaceString)
Replaces all occurences of a String with a given String. |
static java.util.List |
parseTokens(java.lang.String aString,
java.lang.String delimiter)
Takes a String and and a delimiter and returns the parsed tokens as a List |
static java.lang.String |
parseURLArgValue(java.lang.String stringToParse)
Transforms a string to be URL safe. |
static java.lang.String[] |
stringArrayForProcessInfo(ProcessInfo aProcessInfo)
Used for extracting a String array from a ProcessParameter when we are unsure as to whether the value is a String or a String[]. |
static java.lang.String[] |
stringArrayForVector(java.util.Vector aVector)
Make and return a Vector with the contents of the specified array |
static java.lang.String |
stripExtraSpaces(java.lang.String aString)
Return a string with extra spaces removed from aString |
static java.lang.String |
stripString(java.lang.String aString,
char stripChar)
Strips the given character from the String |
static java.lang.String |
stripString(java.lang.String aString,
char[] chars)
Strips an array of characters from the String |
static java.lang.String |
stripString(java.lang.String aString,
java.lang.String stringToRemove)
Strips the first occurence of the specified String (arg2) from the String specified in arg1. |
static java.lang.String |
toMixedCase(java.lang.String aString)
Returns the specified String in its mixed case form. |
static java.util.Vector |
vectorForArray(java.lang.Object[] anArray)
Make and return a Vector with the contents of the specified array |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.ThreadLocal sessionId
Usage (for setting): CLEUtil.sessionId.set(value); Usage (for getting): Object value = CLEUtil.sessionId.get();
Constructor Detail |
public CLEUtil()
Method Detail |
public static java.lang.Object getSessionId()
public static java.lang.String getUnqualifiedClassName(java.lang.Object anObject)
public static java.lang.String getUnqualifiedClassName(java.lang.Class aClass)
public static java.lang.String[] stringArrayForProcessInfo(ProcessInfo aProcessInfo)
public static java.util.Vector vectorForArray(java.lang.Object[] anArray)
public static java.lang.String[] stringArrayForVector(java.util.Vector aVector) throws CLERuntimeException
public static double getProcessInfoAsDoubleValue(ProcessInfo info) throws CLERuntimeException
public static java.lang.Integer getProcessInfoAsInteger(ProcessInfo info) throws CLERuntimeException
public static java.lang.Double getProcessInfoAsDouble(ProcessInfo info) throws CLERuntimeException
public static java.lang.String floatArrayToString(float[] array)
public static java.lang.String parseURLArgValue(java.lang.String stringToParse)
stringToParse
- java.lang.Stringpublic static java.lang.String getUnicodeRepresentation(char charToConvert)
charToConvert
- charpublic static java.lang.String parseString(java.lang.String stringToParse, java.lang.String parseString, java.lang.String replaceString)
stringToParse
- java.lang.String (Target String containg the String
that gets replaced)parseStr
- java.lang.String (String that gets replaced)replaceStr
- java.lang.String (String that replaces)public static java.lang.String stripString(java.lang.String aString, java.lang.String stringToRemove)
public static java.lang.String stripString(java.lang.String aString, char stripChar)
aString
- java.lang.StringstripChar
- charpublic static java.lang.String stripString(java.lang.String aString, char[] chars)
aString
- java.lang.Stringchars
- char[]public static java.lang.String stripExtraSpaces(java.lang.String aString)
public static java.lang.String fitString(java.lang.String aString, int totalCells, boolean padBeginning)
public static java.lang.String toMixedCase(java.lang.String aString)
public static java.net.HttpURLConnection getDefaultURLConnection(java.lang.String strURL)
public static void appendEntryInLog(java.lang.String fileName, java.lang.String entry) throws CLEException
public static java.lang.String getUniqueId(Service aService) throws CLEException
public static java.util.Hashtable mergeHashtables(java.util.Vector vectorOfHashtables) throws CLEException
public java.util.Vector mergeVectors(java.util.Vector vectorOne, java.util.Vector vectorTwo)
public static java.lang.String formatHashtable(java.util.Hashtable aTable)
public java.lang.Object defaultInstanceForName(java.lang.String className)
public static java.lang.Class forName(java.lang.Class scope, java.lang.String className) throws java.lang.ClassNotFoundException
public static java.lang.String getRandomString(int stringSize)
public static java.util.List parseTokens(java.lang.String aString, java.lang.String delimiter)
public static java.io.InputStream getInputStream(java.lang.String fileOrUrlString, java.lang.Class aRelativeClass) throws java.lang.Exception
public double calculateStandardDeviation(java.util.Vector dataSet, boolean sample)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |