Package oracle.iam.policyengine.vo
Class ValueObject
java.lang.Object
oracle.iam.policyengine.vo.ValueObject
- All Implemented Interfaces:
Serializable,Map
- See Also:
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) voidEvaluate each path in the tokenizerMap as if evaluating against a condition and save the resulting EvalList objects in a map for later user.static StringdateToString(Date src) Format a Date value as a String, using the usual "American" format with the current time zone.static StringdateToString(Date date, String simpleDateFormatPattern) static ListdecodeCommaString(String src) Parse a comma delimited string into a List of strings.static ListdecodeCommaString(String src, boolean filterEmpty) entrySet()static voidflattenList(List<Object> inList, List<Object> retList) Flatten out an input list that may contain list entries.Retrieve a path from the ValueObject based on the specified key.booleangetBoolean(String name) Coerce an object into a date.Coerce an object into a date.intstatic intCoerce anObjectinto anintprimitive.intCoerce anObjectinto anintprimitive.getListOfStrings(String name) Retrieve value by key, using alias for key if one existslongCoerce anObjectvalue into alongprimitive.booleanisEmpty()static booleanDetermine if string is a path.keySet()voidvoidputAttributesNoPath(Map<String, Object> attrs) voidsetSavePath(boolean savePath) voidsetTokenizerMap(Map<String, StringTokenizerTS> tmpMap) voidsetTokenizerPathMap(Map<String, String> tmpMap) intsize()static voidsplitPathAroundLastDot(String tmpPath, StringBuilder sbVo, StringBuilder sbAttr) Divide up a path based on the last '.' in the path.static DatestringToDate(String src) toString()values()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
PATH_DELIMS
- See Also:
-
DATE_FORMAT_MILLIS
Timestamp in milliseconds (a stringified Javalongvalue).- See Also:
-
DATE_FORMAT_COMPACT
- See Also:
-
DATE_FORMAT_DEFAULT
- See Also:
-
-
Constructor Details
-
ValueObject
public ValueObject()
-
-
Method Details
-
add
-
getBoolean
-
getDate
Coerce an object into a date. -
getDate
Coerce an object into a date.- Throws:
ValueObjectException
-
getInt
Coerce anObjectinto anintprimitive. -
getList
-
getListOfStrings
-
getLong
Coerce anObjectvalue into alongprimitive. -
getObject
-
toString
-
getString
-
getAttributes
-
putAttributesNoPath
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap
-
containsValue
- Specified by:
containsValuein interfaceMap
-
get
Retrieve a path from the ValueObject based on the specified key. In savePath mode (i.e. for IdentityAudit) always return an EvalList In standard mode do a standard path fetch -
put
- Specified by:
putin interfaceMap- Throws:
IllegalArgumentException
-
remove
- Specified by:
removein interfaceMap- Throws:
IllegalArgumentException
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
getLocal
Retrieve value by key, using alias for key if one exists- Parameters:
keyName- - Name of the key, may be an alias- Returns:
- value
-
getPathToRoot
-
setSavePath
public void setSavePath(boolean savePath) -
createEvalListMap
public void createEvalListMap()Evaluate each path in the tokenizerMap as if evaluating against a condition and save the resulting EvalList objects in a map for later user. -
setTokenizerMap
-
setTokenizerPathMap
-
getTokenizerMap
-
getEvalListMapSize
public int getEvalListMapSize() -
dateToString
Format a Date value as a String, using the usual "American" format with the current time zone. NOTE: The "American" format doesn't sort worth a damn. -
dateToString
- Returns:
- a string representing a specified date in the specified format.
-
isPath
Determine if string is a path. It is a path if it contains a '.' or '[' character. This was done to replace 2 indexOf() calls which were found to be taking a significant amount of time for some scenarios- Parameters:
s-- Returns:
- true if a path, false otherwise
-
getInt
Coerce anObjectinto anintprimitive.- Parameters:
v- number or string representation of a number- Returns:
- int value, possibly truncated, of v
-
flattenList
Flatten out an input list that may contain list entries. Flattened list is contained in retList No entries are removed from retList. Only new non-List entities are added.- Parameters:
inList-retList-
-
splitPathAroundLastDot
Divide up a path based on the last '.' in the path. sbVo will contain everything to the left and sbAttr will contain everything to the right If path does not have any '.' characters then entire path is put into sbVo- Parameters:
tmpPath-sbVo-sbAttr-
-
decodeCommaString
Parse a comma delimited string into a List of strings.- Parameters:
src- comma separated list of values- Returns:
- list of values
-
decodeCommaString
-
stringToDate
- Throws:
ParseException
-