public class PermissionErrorMessageUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PERMISSION_ERROR_CODES_TEMPLATE_KEY
The template definition key used for permission (authorization) error messages.
|
static String |
VARIANT_KEY_ERROR_CODE |
static String |
VARIANT_KEY_LANGUAGE |
Modifier and Type | Method and Description |
---|---|
static String |
createPermissionErrorMessage(String tenantId,
String errorCode,
Map<String,Object> payload)
Creates a permission error message based on the provided error code and payload.
|
static String |
createPermissionErrorMessage(String tenantId,
String errorCode,
String language,
Map<String,Object> payload)
Creates a permission error message based on the provided error code and payload.
|
public static final String PERMISSION_ERROR_CODES_TEMPLATE_KEY
public static final String VARIANT_KEY_ERROR_CODE
public static final String VARIANT_KEY_LANGUAGE
public static String createPermissionErrorMessage(String tenantId, String errorCode, Map<String,Object> payload)
TemplateVariationModel
. This one uses english as the default language.errorCode
- the error code to choose the template variation forpayload
- the optional payload containing the necessary parameters (if any needed by the template)public static String createPermissionErrorMessage(String tenantId, String errorCode, String language, Map<String,Object> payload)
TemplateVariationModel
.errorCode
- the error code to choose the template variation forlanguage
- the language (e.g. "en") for which the message should be renderedpayload
- the optional payload containing the necessary parameters (if any needed by the template)