public class BroadleafWebServicesException extends RuntimeException
Constructor and Description |
---|
BroadleafWebServicesException(int httpStatusCode,
Locale locale,
Map<String,Object[]> messages,
Throwable cause) |
Modifier and Type | Method and Description |
---|---|
BroadleafWebServicesException |
addMessage(String key)
Convenience method for adding a message with no parameters
|
BroadleafWebServicesException |
addMessage(String key,
Object param)
Convenience method for adding a message with a single parameter
|
BroadleafWebServicesException |
addMessage(String key,
Object[] params)
Convenience mentod for adding a message with multiple parameters
|
BroadleafWebServicesException |
addTranslatedMessage(String key,
String message)
Adds a translated message.
|
static BroadleafWebServicesException |
build(int httpStatusCode) |
static BroadleafWebServicesException |
build(int httpStatusCode,
Locale locale) |
static BroadleafWebServicesException |
build(int httpStatusCode,
Locale locale,
Map<String,Object[]> messages) |
static BroadleafWebServicesException |
build(int httpStatusCode,
Locale locale,
Map<String,Object[]> messages,
Throwable cause) |
static BroadleafWebServicesException |
build(int httpStatusCode,
Locale locale,
Throwable t) |
static BroadleafWebServicesException |
build(int httpStatusCode,
Throwable t) |
int |
getHttpStatusCode()
Returns the intended HTTP status code (e.g.
|
Locale |
getLocale()
Returns the
java.util.Locale that messages should be formatted in. |
Map<String,Object[]> |
getMessages()
Gets a map of message keys and object arrays.
|
Map<String,String> |
getTranslatedMessages()
Gets a map of messages that have already been translated.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static final String UNKNOWN_ERROR
public static final String NOT_FOUND
public static final String PRODUCT_NOT_FOUND
public static final String CATEGORY_NOT_FOUND
public static final String SKU_NOT_FOUND
public static final String SEARCH_ERROR
public static final String SEARCH_QUERY_EMPTY
public static final String SEARCH_QUERY_MALFORMED
public static final String INVALID_CATEGORY_ID
public static final String CART_NOT_FOUND
public static final String CART_CUSTOMER_MISMATCH
public static final String CART_ITEM_NOT_FOUND
public static final String CART_PRICING_ERROR
public static final String UPDATE_CART_ERROR
public static final String PROMO_CODE_MAX_USAGES
public static final String PROMO_CODE_INVALID
public static final String PROMO_CODE_EXPIRED
public static final String PROMO_CODE_ALREADY_ADDED
public static final String FULFILLMENT_GROUP_NOT_FOUND
public static final String FULFILLMENT_OPTION_NOT_FOUND
public static final String CUSTOMER_NOT_FOUND
public static final String CUSTOMER_EMAIL_NOT_FOUND
public static final String CUSTOMER_ADDRESS_NOT_FOUND
public static final String CHECKOUT_PROCESSING_ERROR
public static final String CONTENT_TYPE_NOT_SUPPORTED
public static final String METHOD_NOT_SUPPORTED
public static final String QUERY_PARAMETER_NOT_PRESENT
public static final String CUSTOMER_PAYMENT_NOT_FOUND
public static final String INVALID_CUSTOMER_FOR_PAYMENT
public static final String INVALID_ADD_TO_CART_REQUEST
public static final String MISSING_ITEM_NAME
public static final String CUSTOMER_PAYMENT_ORDER_MISMATCH
public static final String ORDER_PAYMENT_NOT_FOUND
public static final String INVALID_ORDER_PAYMENT_FOR_ORDER
public static final String INVALID_FULFILLMENT_GROUP_FOR_ORDER
protected int httpStatusCode
protected Locale locale
public static BroadleafWebServicesException build(int httpStatusCode)
public static BroadleafWebServicesException build(int httpStatusCode, Throwable t)
public static BroadleafWebServicesException build(int httpStatusCode, Locale locale)
public static BroadleafWebServicesException build(int httpStatusCode, Locale locale, Throwable t)
public static BroadleafWebServicesException build(int httpStatusCode, Locale locale, Map<String,Object[]> messages)
public static BroadleafWebServicesException build(int httpStatusCode, Locale locale, Map<String,Object[]> messages, Throwable cause)
public int getHttpStatusCode()
public Map<String,Object[]> getMessages()
org.springframework.context.MessageSource
.public Map<String,String> getTranslatedMessages()
public BroadleafWebServicesException addTranslatedMessage(String key, String message)
key
- message
- public BroadleafWebServicesException addMessage(String key)
key
- public BroadleafWebServicesException addMessage(String key, Object param)
key
- param
- public BroadleafWebServicesException addMessage(String key, Object[] params)
key
- params
- public Locale getLocale()
java.util.Locale
that messages should be formatted in.Copyright © 2020. All rights reserved.