Class Labels

×News: XavaPro 7.7 released - March 11 · Read more
java.lang.Object
org.openxava.util.Labels

public class Labels extends Object
Utility class for obtain the i18n of the labels.

Author:
Javier Paniza
  • Constructor Details

    • Labels

      public Labels()
  • Method Details

    • getQualified

      public static String getQualified(String id)
      On any error returns the sent id with the first letter in uppercase.
    • getQualified

      public static String getQualified(String id, Locale locale)
      On any error returns the sent id with the first letter in uppercase.
    • get

      public static String get(String id)
    • get

      public static String get(String id, Locale locale)
      On any error returns the sent id with the first letter in uppercase.
    • put

      public static void put(String id, Locale locale, 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 String getQualified(String id, Locale locale, String defaultValue)
      Qualified label.

      If you sent customer.warehouse.name it return "Name of Warehouse of Customer".
      If id is not found, or other error returns defaultValue

    • get

      public static String get(String id, Locale locale, String defaultValue)
      If id is not found, or other error returns defaultValue
    • exists

      public static boolean exists(String id)
    • existsExact

      public static boolean existsExact(String id) throws XavaException
      Throws:
      XavaException
    • exists

      public static boolean exists(String id, Locale locale)
    • existsExact

      public static boolean existsExact(String id, Locale locale) throws XavaException
      Throws:
      XavaException
    • removeUnderlined

      public static String removeUnderlined(String label)