public class LocaleFormatter extends java.lang.Object implements AppianErrorCodeFormatter, AppianErrorCodeTitleFormatter
Constructor and Description |
---|
LocaleFormatter(java.util.Locale locale) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
format(AppianErrorCode errorCode,
java.lang.Object... arguments) |
java.lang.String |
formatTitle(AppianErrorCode errorCode,
java.lang.Object... arguments)
Returns the localized title, rendered with the included arguments if the error title supports them.
|
static java.lang.String |
getText(java.lang.Class<?> clazz,
java.util.Locale targetLocale,
java.lang.String key,
java.lang.Object[] params)
Manually fetch error code text
Useful in case that the locale is not available in context and error code is not automatically
converted to correct locale text
|
public java.lang.String format(AppianErrorCode errorCode, java.lang.Object... arguments)
format
in interface AppianErrorCodeFormatter
public java.lang.String formatTitle(AppianErrorCode errorCode, java.lang.Object... arguments)
formatTitle
in interface AppianErrorCodeTitleFormatter
errorCode
- The code corresponding to the thrown exceptionarguments
- Additional parameters required to render the titlepublic static java.lang.String getText(java.lang.Class<?> clazz, java.util.Locale targetLocale, java.lang.String key, java.lang.Object[] params)
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.