|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.broadleafcommerce.core.web.api.BroadleafWebServicesException
public class BroadleafWebServicesException
The purpose of this is to allow REST endpoints to build an exception with
| Field Summary | |
|---|---|
static String |
CART_ITEM_NOT_FOUND
|
static String |
CART_NOT_FOUND
|
static String |
CART_PRICING_ERROR
|
static String |
CATEGORY_NOT_FOUND
|
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 Summary | |
|---|---|
BroadleafWebServicesException(int httpStatusCode,
Locale locale,
Map<String,Object[]> messages,
Throwable cause)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public 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
protected int httpStatusCode
protected Map<String,Object[]> messages
protected Map<String,String> translatedMessages
protected Locale locale
| Constructor Detail |
|---|
public BroadleafWebServicesException(int httpStatusCode,
Locale locale,
Map<String,Object[]> messages,
Throwable cause)
| Method Detail |
|---|
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||