Class LocalizationUtil
- java.lang.Object
-
- com.evolveum.midpoint.schema.util.LocalizationUtil
-
public class LocalizationUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description LocalizationUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LocalizableMessageType
createForFallbackMessage(String fallbackMessage)
static LocalizableMessageType
createForKey(String key)
static LocalizableMessageType
createLocalizableMessageType(LocalizableMessage message)
static LocalizableMessageType
createLocalizableMessageType(LocalizableMessage message, Function<LocalizableMessage,String> resolveKeys)
static Locale
toLocale(String str)
Returns locale object for provided string usingLocaleUtils.toLocale(String)
.static Locale
toLocale(String str, Locale defaultLocale)
Returns locale object for provided string usingLocaleUtils.toLocale(String)
.static LocalizableMessage
toLocalizableMessage(@NotNull LocalizableMessageType message)
static LocalizableMessage
toLocalizableMessage(@NotNull SingleLocalizableMessageType message)
-
-
-
Field Detail
-
LOGGER
public static final Trace LOGGER
-
-
Method Detail
-
createLocalizableMessageType
public static LocalizableMessageType createLocalizableMessageType(LocalizableMessage message)
-
createLocalizableMessageType
public static LocalizableMessageType createLocalizableMessageType(LocalizableMessage message, Function<LocalizableMessage,String> resolveKeys)
-
createForFallbackMessage
public static LocalizableMessageType createForFallbackMessage(String fallbackMessage)
-
createForKey
public static LocalizableMessageType createForKey(String key)
-
toLocalizableMessage
public static LocalizableMessage toLocalizableMessage(@NotNull @NotNull LocalizableMessageType message)
-
toLocalizableMessage
public static LocalizableMessage toLocalizableMessage(@NotNull @NotNull SingleLocalizableMessageType message)
-
toLocale
public static Locale toLocale(String str)
Returns locale object for provided string usingLocaleUtils.toLocale(String)
. If the input string is null, or the conversion fails, null is returned.
-
-