Class RoleLocalizedValuesUtils

java.lang.Object
io.jmix.security.impl.role.RoleLocalizedValuesUtils

@NullMarked public final class RoleLocalizedValuesUtils extends Object
Reads and writes a bundle of the localized values of a role, its localizedNames or localizedDescriptions: a Properties text whose keys are locales as LocaleResolver.localeToString(java.util.Locale) gives them, such as en=Administrator.
  • Method Details

    • read

      public static Map<String,String> read(@Nullable String bundle)
      Returns:
      the entries of the bundle, or none for null or an empty bundle
      Throws:
      IllegalArgumentException - if the bundle cannot be read, such as one with a malformed Unicode escape
    • write

      public static @Nullable String write(Map<String,String> entries)
      Returns:
      the bundle of the entries, or null if there are none