Class LocaleFormatter
java.lang.Object
com.appiancorp.suiteapi.common.exceptions.LocaleFormatter
- All Implemented Interfaces:
AppianErrorCodeTitleFormatter
,AppianErrorCodeFormatter
public class LocaleFormatter
extends Object
implements AppianErrorCodeFormatter, AppianErrorCodeTitleFormatter
ErrorCodeFormatter based upon a Locale.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionformat
(AppianErrorCode errorCode, Object... arguments) formatTitle
(AppianErrorCode errorCode, Object... arguments) Returns the localized title, rendered with the included arguments if the error title supports them.static String
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
-
Constructor Details
-
LocaleFormatter
-
-
Method Details
-
format
- Specified by:
format
in interfaceAppianErrorCodeFormatter
-
formatTitle
Returns the localized title, rendered with the included arguments if the error title supports them. If the title does not exist, the method returns "".- Specified by:
formatTitle
in interfaceAppianErrorCodeTitleFormatter
- Parameters:
errorCode
- The code corresponding to the thrown exceptionarguments
- Additional parameters required to render the title- Returns:
- The title, localized and rendered with the included arguments where applicable.
-
getText
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
-