Package com.portal.common
Class InfranetLocaleData
java.lang.Object
com.portal.common.InfranetLocaleData
- All Implemented Interfaces:
Serializable
,Comparable
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionint
Return the Portal locale of the language for the locale description.Return the Portal locale string contained in this class.Return the Java locale string contained in this class.static String
getJavaLocaleStr
(Locale javaLocale) Extract the Java locale string from the specified Java locale.Return the locale description.int
Return the ID of the locale description string.boolean
Test to see if the specified Portal locale string is the same as the Portal locale string contained in this class.static boolean
Test to see if the two specified Portal locale strings are equal.boolean
Test to see if the specified Java locale matches the Java locale locale string contained in this class.toString()
Return the string representation of this class.
-
Method Details
-
getInfranetLocale
Return the Portal locale string contained in this class. The Portal locale string is the two letter ISO language code plus the underscore character plus the optional two letter ISO country code (i.e. "en_us", "en")- Returns:
- the Portal locale string contained in this class.
-
getJavaLocale
Return the Java locale string contained in this class. The Java locale string is the two letter ISO language code plus the underscore character plus the optional two letter ISO country code (i.e. "en_us", "en". At present the Java locale string is the same as the Portal locale string but please don't make that assumption when coding!!- Returns:
- the Java locale string contained in this class.
-
getLocaleDescriptionID
public int getLocaleDescriptionID()Return the ID of the locale description string. This is the ID in the /config/strings table.- Returns:
- the ID of the locale description string
-
getLocaleDescription
Return the locale description.- Returns:
- the locale description
-
getDescriptionLocale
Return the Portal locale of the language for the locale description.- Returns:
- the Portal locale of the language for the locale description.
-
isEqual
Test to see if the two specified Portal locale strings are equal. An Portal locale string is the two letter ISO language code plus the underscore character plus the optional two letter ISO country code (i.e. "en_us", "en")- Parameters:
extactMatch
- If this flag is true then the locale string must be an exact match. If this flag is flase then only match the language portion in each locale string.infranetLocale
- The first Portal locale string to evaluate.infranetLocale
- The second Portal locale string to evaluate.- Returns:
- true if the specified Portal locale strings are "equal", otherwise return false.
-
isEqual
Test to see if the specified Portal locale string is the same as the Portal locale string contained in this class. An Portal locale string is the two letter ISO language code plus the underscore character plus the optional two letter ISO country code (i.e. "en_us", "en")- Parameters:
infranetLocale
- The Portal locale string to evaluate.extactMatch
- If this flag is true then the locale string must be an exact match. If this flag is flase then only match the language portion in each locale string.- Returns:
- true if the specified Portal locale string is "equal" to the Portal locale string contained in this class, otherwise return false.
-
isEqual
Test to see if the specified Java locale matches the Java locale locale string contained in this class. A Java locale string is the two letter ISO language code plus the underscore character plus the optional two letter ISO country code (i.e. "en_us", "en")- Parameters:
javaLocale
- The Java locale to evaluate.extactMatch
- If this flag is true then the locale string must be an exact match. If this flag is flase then only match the language portion in each locale string.- Returns:
- true of the specified Java locale matches the Java locale string contained in this class, otherwise return false.
-
toString
Return the string representation of this class. -
compareTo
- Specified by:
compareTo
in interfaceComparable
-
getJavaLocaleStr
Extract the Java locale string from the specified Java locale. The Java locale string is the two letter ISO language code plus the underscore character plus the optional two letter ISO country code (i.e. "en_us", "en")- Returns:
- the Java locale string extracted from the specified Java locale.
-