|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.iam.policyengine.vo.Util
public class Util
Field Summary | |
---|---|
static java.lang.String |
DATE_FORMAT_AM_PM |
static java.lang.String |
DATE_FORMAT_CANONICAL Deprecated. Will become a private constant since this doesn't handle parsing a general IS0-8601 format. (Only handles our subset). Instead always use the public methods stringToDate and getCanonicalDateString. (At some point we may want to handle parsing a general IS0-8601 format). |
static java.lang.String |
DATE_FORMAT_COMPACT Year-month-day with twenty-four-hour time: "yyyyMMdd HH:mm:ss" |
static java.lang.String |
DATE_FORMAT_DEFAULT |
static java.lang.String |
DATE_FORMAT_MILLIS Timestamp in milliseconds (a stringified Java long value). |
static java.lang.String |
DATE_FORMAT_NO_SPACE |
static java.util.TimeZone |
TIME_ZONE_CANONICAL |
Constructor Summary | |
---|---|
Util() |
Method Summary | |
---|---|
static java.lang.String |
dateToString(java.util.Date src) Format a Date value as a String, using the usual "American" format with the current time zone. |
static java.lang.String |
dateToString(java.util.Date date, java.lang.String simpleDateFormatPattern) |
static java.util.List |
decodeCommaString(java.lang.String src) Parse a comma delimited string into a List of strings. |
static java.util.List |
decodeCommaString(java.lang.String src, boolean filterEmpty) |
static void |
flattenList(java.util.List inList, java.util.List retList) Flatten out an input list that may contain list entries. |
static java.lang.String |
getCanonicalDateString(java.util.Date date, java.util.TimeZone timeZone) |
static int |
getInt(java.lang.Object v) Coerce an Object into an int primitive. |
static boolean |
isNumeric(java.lang.String s) |
static boolean |
isPath(java.lang.String s) Determine if string is a path. |
static java.lang.String |
itoa(int i) Convert an primitive integer value into a String. |
static java.lang.String |
lpad(java.lang.String str, int length) Left-pad a string to the specified length. |
static java.lang.String |
lpad(java.lang.String str, int length, char padChar) Left-pad a string to the specified length with the specified character. |
static java.lang.String |
pad(java.lang.String s, int len, char pad, boolean leftPad) |
static void |
splitPathAroundLastDot(java.lang.String tmpPath, java.lang.StringBuilder sbVo, java.lang.StringBuilder sbAttr) Divide up a path based on the last '.' in the path. |
static java.util.Date |
stringToDate(java.lang.String src) Convert the string representation for a date into a Date object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DATE_FORMAT_COMPACT
"yyyyMMdd HH:mm:ss"
public static final java.lang.String DATE_FORMAT_DEFAULT
public static final java.lang.String DATE_FORMAT_AM_PM
public static final java.lang.String DATE_FORMAT_NO_SPACE
public static final java.lang.String DATE_FORMAT_CANONICAL
public static java.util.TimeZone TIME_ZONE_CANONICAL
public static final java.lang.String DATE_FORMAT_MILLIS
long
value).
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static boolean isNumeric(java.lang.String s)
s
- stringpublic static java.util.Date stringToDate(java.lang.String src) throws java.text.ParseException
M/d/y H:m:s z M/d/y H:m:s M/d/y yyyyMMdd HH:mm:ss (default) yyyyMMdd HH:mm:ss.SSS (old canonical) yyyyMMddTHH:mm:ss.SSS (old canonical absolute) yyyy-MM-ddTHH:mm:ss.SSSZ (canonical, no offset) yyyy-MM-ddTHH:mm:ss.SSS+/-HHMM (canonical, offset) nnnnnnnnnnnnnnnnn (milliseconds)
java.text.ParseException
Util.DATE_FORMAT_COMPACT
, Util.DATE_FORMAT_DEFAULT
, Util.DATE_FORMAT_MILLIS
public static java.lang.String dateToString(java.util.Date src)
public static java.util.List decodeCommaString(java.lang.String src)
src
- comma separated list of valuespublic static java.util.List decodeCommaString(java.lang.String src, boolean filterEmpty)
public static java.lang.String dateToString(java.util.Date date, java.lang.String simpleDateFormatPattern)
public static java.lang.String getCanonicalDateString(java.util.Date date, java.util.TimeZone timeZone)
public static java.lang.String lpad(java.lang.String str, int length)
str
- stringlength
- length for padded stringUtil.isNumeric(String)
public static java.lang.String lpad(java.lang.String str, int length, char padChar)
str
- stringlength
- length for padpadChar
- character to use for paddingpublic static java.lang.String pad(java.lang.String s, int len, char pad, boolean leftPad)
s
- - the input string to pad.len
- - pad to this length.pad
- - pad with this character.leftPad
- - if true, prepend pad characters; otherwise, append.public static int getInt(java.lang.Object v)
Object
into an int
primitive.v
- number or string representation of a numberpublic static java.lang.String itoa(int i)
i
- integerpublic static void flattenList(java.util.List inList, java.util.List retList)
inList
-retList
-public static boolean isPath(java.lang.String s)
s
-public static void splitPathAroundLastDot(java.lang.String tmpPath, java.lang.StringBuilder sbVo, java.lang.StringBuilder sbAttr)
tmpPath
-sbVo
-sbAttr
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |