|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.mdm.index.edm.util.QwsUtil
Utility class contains commonly used functions across QWS.
Constructor Summary | |
QwsUtil()
|
Method Summary | |
static java.util.List |
convertMapValueToList(java.util.Map map)
Convert a Map values to a List. |
static java.lang.String |
escapeSpaceInString(java.lang.String inStr)
Conver the space within a String to underscore. |
static java.util.List |
formatList(java.util.List orgList,
int count)
Convert a ordinary List to a List of List, each entry in the returned List holds count objects in the original list. |
static java.util.Map |
formatRequestParameterMap(java.util.Map parameterMap)
Format the paramater map from HttpRequest. |
static java.lang.String |
getFieldNameFromFieldPath(java.lang.String fieldPath)
Retrieves the field name from a field path. |
static java.lang.String |
getLastObjRefFromFieldPath(java.lang.String fieldPath)
Retrieves the last object reference from a field path. |
static java.lang.Object |
getObjectValue(java.lang.String valueString,
int type)
Convert a string value to an object: e.g., int -> Integer, date -> Date |
static java.lang.String |
getObjRefFromFieldPath(java.lang.String fieldPath)
|
static SBROverWrite |
getOverWrite(SBR sbr,
ObjectNode node,
java.lang.String fname)
Get the SBROverWrite object |
static java.lang.String |
getResourceForKey(java.lang.String key)
Get resouce for the indicated key. |
static java.lang.Throwable |
getRootCause(java.lang.Exception e)
Get the throwable of the root cause |
static java.util.Collection |
getValueForField(ObjectNode majorNode,
java.lang.String fieldPath,
UserProfile user)
Get value for the specified field name. |
static boolean |
isObjectNodeSensitive(ObjectNode obj)
|
static void |
setObjectNodeFieldValue(ObjectNode node,
java.lang.String field,
java.lang.String valueString)
Set value for the named field in the specified object. |
static void |
setObjectNodeFieldValue(ObjectNode node,
java.lang.String field,
java.lang.String valueString,
SBR sbr)
Set value for the named field in the specified object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public QwsUtil()
Method Detail |
public static java.util.List convertMapValueToList(java.util.Map map)
map
- the Map to be converted.
public static java.lang.String escapeSpaceInString(java.lang.String inStr)
inStr
- any String.
public static java.util.List formatList(java.util.List orgList, int count)
count
objects in the original list.
orgList
- the input List.count
- the number of objects in each element of the returned List.
count
objects.public static java.util.Map formatRequestParameterMap(java.util.Map parameterMap)
parameterMap
- the map obtained via request.getParameterMap()
where request
is of type HttpServletRequest
.
public static java.lang.String getFieldNameFromFieldPath(java.lang.String fieldPath)
fieldPath
- String representing the field path.
public static java.lang.String getLastObjRefFromFieldPath(java.lang.String fieldPath)
fieldPath
- String representing the field path.
public static java.lang.Object getObjectValue(java.lang.String valueString, int type) throws ObjectException
valueString
- the value stringtype
- the type of the field
ObjectException
- when invalid field value is encounteredpublic static java.lang.String getObjRefFromFieldPath(java.lang.String fieldPath)
public static SBROverWrite getOverWrite(SBR sbr, ObjectNode node, java.lang.String fname) throws ObjectException
sbr
- the SBRnode
- the nodefname
- the field name in the sbr
ObjectException
- when object operation failspublic static java.lang.String getResourceForKey(java.lang.String key)
key
- the key Sting used to identify a resource entry.
public static java.lang.Throwable getRootCause(java.lang.Exception e)
public static java.util.Collection getValueForField(ObjectNode majorNode, java.lang.String fieldPath, UserProfile user) throws ObjectException
EPath
not working. Add a work-arodun here.
majorNode
- an ObjectNode
that represents the top-level
object. E.g., "Person".fieldPath
- the field of interest. E.g., for major object, it's in
the format of "Person.SSN". For minor object, it's in the format of
"Person.Address.City".
ObjectException
public static boolean isObjectNodeSensitive(ObjectNode obj) throws ObjectException
ObjectException
public static void setObjectNodeFieldValue(ObjectNode node, java.lang.String field, java.lang.String valueString) throws ObjectException, ValidationException
node
- the object nodefield
- the field name in the object node.valueString
- the string value to set to
ObjectException
- when object operation fails
ValidationException
- when validation failspublic static void setObjectNodeFieldValue(ObjectNode node, java.lang.String field, java.lang.String valueString, SBR sbr) throws ObjectException, ValidationException
node
- the object nodefield
- the field name in the object node.valueString
- the string value to set tosbr
- the sbr
ObjectException
- when object operation fails
ValidationException
- when validation fails
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Sun Microsystems, Inc.