public class BroadleafWebServicesException extends RuntimeException
| Modifier and Type | Field and Description |
|---|---|
static String |
CART_ITEM_NOT_FOUND |
static String |
CART_NOT_FOUND |
static String |
CART_PRICING_ERROR |
static String |
CATEGORY_NOT_FOUND |
static String |
CHECKOUT_PROCESSING_ERROR |
static String |
CUSTOMER_NOT_FOUND |
static String |
FULFILLMENT_GROUP_NOT_FOUND |
static String |
FULFILLMENT_OPTION_NOT_FOUND |
protected int |
httpStatusCode |
static String |
INVALID_CATEGORY_ID |
protected Locale |
locale |
protected Map<String,Object[]> |
messages |
static String |
PRODUCT_NOT_FOUND |
static String |
PROMO_CODE_INVALID |
static String |
PROMO_CODE_MAX_USAGES |
static String |
SEARCH_ERROR |
static String |
SEARCH_QUERY_EMPTY |
static String |
SEARCH_QUERY_MALFORMED |
static String |
SKU_NOT_FOUND |
protected Map<String,String> |
translatedMessages |
static String |
UNKNOWN_ERROR |
static String |
UPDATE_CART_ERROR |
| 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, toStringpublic static final String UNKNOWN_ERROR
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_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 FULFILLMENT_GROUP_NOT_FOUND
public static final String FULFILLMENT_OPTION_NOT_FOUND
public static final String CUSTOMER_NOT_FOUND
public static final String CHECKOUT_PROCESSING_ERROR
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 © 2014. All Rights Reserved.