public final class EproUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
static java.text.SimpleDateFormat | displayDateFormat
This format is used for output by default
|
static java.text.SimpleDateFormat | displayTimeFormat
This format is used for output by default
|
static java.text.SimpleDateFormat | displayTimestampFormat
This format is used for output by default
|
static java.lang.String | jdbcTimestampFormat
This format is a default JDBC timestamp escape format without nanoseconds.
|
static java.text.SimpleDateFormat[] | supportedDateFormats
These formats supported for converting strings to dates
|
static java.text.SimpleDateFormat[] | supportedTimeFormats
These formats supported for converting strings to time
|
static java.text.SimpleDateFormat[] | supportedTimestampFormats
These formats supported for converting strings to date and time format.
|
Constructor and Description |
---|
EproUtil()
Util constructor comment.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String | dateToString(java.sql.Date date)
Returns the date as a String formatted by the default format displayDateFormat.
|
static java.lang.String | dateToString(java.sql.Date date, java.lang.String format)
Returns the date as a String formatted by the supplied format A null date is converted to a null String.
|
static java.lang.Object | doCheckParameterFound(java.util.Map h, java.lang.String parameterName)
Return the value of the key in the Map, if value of the key doesn't exist, throw exception.
|
static java.lang.String | endTag(java.lang.String tagName)
Return the XML end tag with tag name included.
|
java.lang.String | getCategoryName(java.lang.String storeId, java.lang.String langId, java.lang.String catIdentifier)
Returns category name in string type by passing its store ID, language ID and identifier
|
java.lang.String | getCatEntryId(java.lang.String partNumber, java.lang.String dN)
Return CATENTRY ID (Reference Number) in string type by passing its unique index.
|
java.lang.String | getCatGroupId(java.lang.String identifier, java.lang.String dN)
Returns category ID in string type by passing its unique index.
|
static java.lang.Long | getMbrGrpId(java.lang.String mbrGrpName, java.lang.String ownerDN)
Returns member group ID with the given name & owner
|
static java.lang.Long | getOwnerId(java.lang.String dn)
Returns owner ID of the store with a given owner
|
static java.lang.Integer[] | getRelatedStoreIds(StoreKey skey)
This Static method returns the StoreIdss of all the Stores related to this Store by com.ibm.commerce.promotions relationship.
|
static StoreKey[] | getRelatedStores(StoreKey sKey)
This Static method returns the StoreKeys of all the Stores related to this Store through com.ibm.commerce.promotions relationship.
|
java.lang.String | getShipModeId(java.lang.String code, java.lang.String carrier, java.lang.String storeName, java.lang.String ownerDN)
Return shipping mode id in string type by passing its unique index.
|
java.lang.String | getSKU(java.lang.String catentry_id)
Return SKU of string type by passing its CATENTRY ID.
|
java.lang.String | getSKUName(java.lang.String langId, java.lang.String catentry_id)
Returns SKU name by passing its CATENTRY ID.
|
java.util.Vector | getSKUs(java.util.Vector catentryIds)
Returns SKU Vector by passing its CATENTRY ID vector.
|
java.lang.String | getSKUType(java.lang.String catentry_id)
Returns SKU type by passing its CATENTRY ID.
|
static java.lang.Integer | getStoreId(StoreKey key)
Returns Store Id of the store with a given store key
|
static boolean | isBlank(java.lang.String s)
Takes a string and returns true if it is null, an empty string, or string containing only white space.
|
static boolean | isValidDate(java.lang.String s)
Returns true if the string is a valid date or is an empty string, false otherwise.
|
static boolean | isValidDateFormat(java.lang.String format)
Tests if the date format pattern specified is valid.
|
static boolean | isValidTime(java.lang.String s)
Returns true if the string is a valid date or is an empty string, false otherwise.
|
static boolean | isValidTimestamp(java.lang.String s)
Returns true if the string is a valid timestamp or is an empty string false otherwise.
|
static java.lang.String | normalizeDatetime(java.lang.String s)
Gets rid of unnecessary punctuation, multiple white space and other anomalies in a Datetime string.
|
static java.lang.String | replaceSubstring(java.lang.String str, java.lang.String substr1, java.lang.String substr2, int startFromLocation)
Utility function used to replace all occurrences of substring 1 (substr1) with substring 2 (substr2) in string object.
|
static void | requireParameterNotNull(java.lang.String className, java.lang.String methodName, java.lang.String parameterName, java.lang.Object object)
Clients should call this when they receive a parameter that may not be null.
|
static java.lang.String | spacesToUnderscores(java.lang.String s)
Takes a String and converts the blank spaces inside the String to underscores, then returns this new String
|
static java.lang.String | startTag(java.lang.String tagName)
Return an XML start tag with given tag name.
|
static java.sql.Date | stringToDate(java.lang.String s)
Converts a String to a Date.
|
static java.sql.Date | stringToDate(java.lang.String s, java.lang.String format)
Converts a String to a Dateusing the given format.
|
static java.sql.Time | stringToTime(java.lang.String s)
Converts a String to a Time.
|
static java.sql.Time | stringToTime(java.lang.String s, java.lang.String format)
Converts a String to a Timeusing the given format.
|
static java.sql.Timestamp | stringToTimestamp(java.lang.String s)
Converts a String to a Timestamp.
|
static java.sql.Timestamp | stringToTimestamp(java.lang.String s, java.lang.String format)
Converts a String to a Timestampusing the given format.
|
static java.sql.Timestamp | stringToTimestamp(java.lang.String s, java.lang.String format, java.util.Locale lcl)
Converts a String to a Timestampusing the given format and lcl.
|
static java.lang.String | timestampToString(java.util.Date date)
Returns the date as a String formatted by the default format displayDateFormat.
|
static java.lang.String | timestampToString(java.util.Date date, java.lang.String format)
Returns the date as a String formatted by the supplied format A null date is converted to a null String.
|
static java.lang.String | timestampToString(java.sql.Timestamp date)
Returns the date as a String formatted by the default format displayDateFormat.
|
static java.lang.String | timestampToString(java.sql.Timestamp date, java.lang.String format)
Returns the date as a String formatted by the supplied format A null date is converted to a null String.
|
static java.lang.String | timestampToString(java.sql.Timestamp date, java.lang.String format, java.util.Locale lcl)
Returns the date as a String formatted by the supplied format and locale A null date is converted to a null String.
|
static java.lang.String | timeToString(java.sql.Time time)
Returns the date as a String formatted by the default format displayDateFormat.
|
static java.lang.String | timeToString(java.sql.Time time, java.lang.String format)
Returns the date as a String formatted by the supplied format A null date is converted to a null String.
|
static boolean | toBoolean(java.lang.Object value)
Convert Object into a boolean primitive type
|
static boolean | toBoolean(java.lang.String value)
Convert String into a boolean primitive type
|
static int | toInt(java.lang.Object value)
Convert Object into an int primitive type
|
static int | toInt(java.lang.String value)
Convert String into an int primitive type
|
static java.util.Vector | toReversedVector(java.util.Vector originalVector)
This method is using to reverse the order of Vector's objects.
|
static java.util.Vector | toVector(java.lang.Object value)
This method will convert an Object type of vector into a Vector type.
|
public static final java.lang.String COPYRIGHT
public static java.lang.String jdbcTimestampFormat
public static java.text.SimpleDateFormat displayDateFormat
public static java.text.SimpleDateFormat displayTimeFormat
public static java.text.SimpleDateFormat displayTimestampFormat
public static java.text.SimpleDateFormat[] supportedDateFormats
public static java.text.SimpleDateFormat[] supportedTimeFormats
public static java.text.SimpleDateFormat[] supportedTimestampFormats
public static java.lang.String dateToString(java.sql.Date date)
public static java.lang.String dateToString(java.sql.Date date, java.lang.String format)
public static java.lang.Object doCheckParameterFound(java.util.Map h, java.lang.String parameterName) throws ParameterNotFoundException
public static java.lang.String endTag(java.lang.String tagName)
public static boolean isBlank(java.lang.String s)
public static boolean isValidDate(java.lang.String s)
public static boolean isValidDateFormat(java.lang.String format)
public static boolean isValidTime(java.lang.String s)
public static boolean isValidTimestamp(java.lang.String s)
public static java.lang.String normalizeDatetime(java.lang.String s)
public static java.lang.String replaceSubstring(java.lang.String str, java.lang.String substr1, java.lang.String substr2, int startFromLocation)
public static final void requireParameterNotNull(java.lang.String className, java.lang.String methodName, java.lang.String parameterName, java.lang.Object object)
public static java.lang.String spacesToUnderscores(java.lang.String s)
public static java.lang.String startTag(java.lang.String tagName)
public static java.sql.Date stringToDate(java.lang.String s) throws java.text.ParseException
public static java.sql.Date stringToDate(java.lang.String s, java.lang.String format) throws java.text.ParseException
public static java.sql.Time stringToTime(java.lang.String s) throws java.text.ParseException
public static java.sql.Time stringToTime(java.lang.String s, java.lang.String format) throws java.text.ParseException
public static java.sql.Timestamp stringToTimestamp(java.lang.String s) throws java.text.ParseException
public static java.sql.Timestamp stringToTimestamp(java.lang.String s, java.lang.String format) throws java.text.ParseException
public static java.sql.Timestamp stringToTimestamp(java.lang.String s, java.lang.String format, java.util.Locale lcl) throws java.text.ParseException
public static java.lang.String timestampToString(java.sql.Timestamp date)
public static java.lang.String timestampToString(java.sql.Timestamp date, java.lang.String format)
public static java.lang.String timestampToString(java.util.Date date)
public static java.lang.String timestampToString(java.util.Date date, java.lang.String format)
public static java.lang.String timestampToString(java.sql.Timestamp date, java.lang.String format, java.util.Locale lcl)
public static java.lang.String timeToString(java.sql.Time time)
public static java.lang.String timeToString(java.sql.Time time, java.lang.String format)
public static boolean toBoolean(java.lang.Object value)
public static boolean toBoolean(java.lang.String value)
public static int toInt(java.lang.Object value)
public static int toInt(java.lang.String value)
public static java.util.Vector toReversedVector(java.util.Vector originalVector)
public static java.util.Vector toVector(java.lang.Object value)
public java.lang.String getCatEntryId(java.lang.String partNumber, java.lang.String dN) throws ECException
public java.lang.String getShipModeId(java.lang.String code, java.lang.String carrier, java.lang.String storeName, java.lang.String ownerDN) throws ECException
public java.lang.String getSKU(java.lang.String catentry_id) throws ECException
public java.lang.String getSKUType(java.lang.String catentry_id) throws ECException
public java.lang.String getSKUName(java.lang.String langId, java.lang.String catentry_id) throws ECException
public java.util.Vector getSKUs(java.util.Vector catentryIds) throws ECException
public java.lang.String getCatGroupId(java.lang.String identifier, java.lang.String dN) throws ECException
public java.lang.String getCategoryName(java.lang.String storeId, java.lang.String langId, java.lang.String catIdentifier) throws ECException
public static StoreKey[] getRelatedStores(StoreKey sKey)
public static java.lang.Integer[] getRelatedStoreIds(StoreKey skey)
public static java.lang.Integer getStoreId(StoreKey key) throws ECException
public static java.lang.Long getMbrGrpId(java.lang.String mbrGrpName, java.lang.String ownerDN)
DN
public static java.lang.Long getOwnerId(java.lang.String dn) throws ECException
DN