Package org.openxava.util
Class Labels
- java.lang.Object
-
- org.openxava.util.Labels
-
public class Labels extends java.lang.Object
Utility class for obtain the i18n of the labels.- Author:
- Javier Paniza
-
-
Constructor Summary
Constructors Constructor Description Labels()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
exists(java.lang.String id)
static boolean
exists(java.lang.String id, java.util.Locale locale)
static boolean
existsExact(java.lang.String id)
static boolean
existsExact(java.lang.String id, java.util.Locale locale)
static java.lang.String
get(java.lang.String id)
static java.lang.String
get(java.lang.String id, java.util.Locale locale)
On any error returns the sentid
with the first letter in uppercase.static java.lang.String
get(java.lang.String id, java.util.Locale locale, java.lang.String defaultValue)
Ifid
is not found, or other error returnsdefaultValue
static java.lang.String
getQualified(java.lang.String id)
On any error returns the sentid
with the first letter in uppercase.static java.lang.String
getQualified(java.lang.String id, java.util.Locale locale)
On any error returns the sentid
with the first letter in uppercase.static java.lang.String
getQualified(java.lang.String id, java.util.Locale locale, java.lang.String defaultValue)
Qualified label.static void
put(java.lang.String id, java.util.Locale locale, java.lang.String label)
Add or change a label by locale.static java.lang.String
removeUnderlined(java.lang.String label)
-
-
-
Method Detail
-
getQualified
public static java.lang.String getQualified(java.lang.String id)
On any error returns the sentid
with the first letter in uppercase.
-
getQualified
public static java.lang.String getQualified(java.lang.String id, java.util.Locale locale)
On any error returns the sentid
with the first letter in uppercase.
-
get
public static java.lang.String get(java.lang.String id)
-
get
public static java.lang.String get(java.lang.String id, java.util.Locale locale)
On any error returns the sentid
with the first letter in uppercase.
-
put
public static void put(java.lang.String id, java.util.Locale locale, java.lang.String label)
Add or change a label by locale.The result is not persistent, after reinit the application the changes are gone.
- Since:
- 5.8
-
getQualified
public static java.lang.String getQualified(java.lang.String id, java.util.Locale locale, java.lang.String defaultValue)
Qualified label.If you sent customer.warehouse.name it return "Name of Warehouse of Customer".
Ifid
is not found, or other error returnsdefaultValue
-
get
public static java.lang.String get(java.lang.String id, java.util.Locale locale, java.lang.String defaultValue)
Ifid
is not found, or other error returnsdefaultValue
-
exists
public static boolean exists(java.lang.String id)
-
existsExact
public static boolean existsExact(java.lang.String id) throws XavaException
- Throws:
XavaException
-
exists
public static boolean exists(java.lang.String id, java.util.Locale locale)
-
existsExact
public static boolean existsExact(java.lang.String id, java.util.Locale locale) throws XavaException
- Throws:
XavaException
-
removeUnderlined
public static java.lang.String removeUnderlined(java.lang.String label)
-
-