Class Constants
java.lang.Object
com.skava.orchestration.constants.Constants
The Class Constants
Common Constants that are available in the Orchestration Services are maintained here.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
CAMEL_HTTP_RESPONSE_CODEstatic final String
The Constant DEFAULT_LOCALE.static final String
The Constant ERR_HYSTRIX_TIMEOUT.static final String
locale keywordstatic final String
The Constant MSG_HYSTRIX_TIMEOUT.static final String
The Constant PROP_APPLYSHIPPINGOBJECT.static final String
The Constant PROP_DELIVERYDETAILS.static final String
-
Method Summary
Modifier and TypeMethodDescriptionstatic Locale
getLocaleOrDefault
(String locale) Gets the locale or default.static String
getMessage
(String responseCode, org.springframework.context.MessageSource messageSource, String locale) getMessage to return message for responseCode .static String
getMessage
(String responseCode, org.springframework.context.MessageSource messageSource, String defaultMessage, String locale) Gets the message.static org.springframework.context.support.ResourceBundleMessageSource
This method is used to get the message source.static void
throwValidateException
(String errorCode, org.springframework.context.MessageSource messageSource, String locale) Throw validate exception.
-
Field Details
-
CAMEL_HTTP_RESPONSE_CODE
CAMEL_HTTP_RESPONSE_CODE- See Also:
-
DEFAULT_LOCALE
The Constant DEFAULT_LOCALE.- See Also:
-
KEY_LOCALE
locale keyword- See Also:
-
ERR_HYSTRIX_TIMEOUT
The Constant ERR_HYSTRIX_TIMEOUT.- See Also:
-
MSG_HYSTRIX_TIMEOUT
The Constant MSG_HYSTRIX_TIMEOUT.- See Also:
-
PROP_APPLYSHIPPINGOBJECT
The Constant PROP_APPLYSHIPPINGOBJECT.- See Also:
-
PROP_DELIVERYDETAILS
The Constant PROP_DELIVERYDETAILS.- See Also:
-
ROLE_ACCOUNT_BUYER
- See Also:
-
-
Method Details
-
getMessage
public static String getMessage(String responseCode, org.springframework.context.MessageSource messageSource, String locale) getMessage to return message for responseCode .- Parameters:
responseCode
- to get response message for this codemessageSource
- stored multiple messages in this bundlelocale
- to get message according to this locale- Returns:
- String returned response message for input responseCode
-
getMessage
public static String getMessage(String responseCode, org.springframework.context.MessageSource messageSource, String defaultMessage, String locale) Gets the message.- Parameters:
responseCode
- the response codemessageSource
- the message sourcedefaultMessage
- the default messagelocale
- the locale- Returns:
- the message
-
getLocaleOrDefault
Gets the locale or default.- Parameters:
locale
- the locale- Returns:
- the locale or default
-
throwValidateException
public static void throwValidateException(String errorCode, org.springframework.context.MessageSource messageSource, String locale) Throw validate exception.- Parameters:
errorCode
- the error codemessageSource
- the message sourcelocale
- the locale
-
getMessageSource
public static org.springframework.context.support.ResourceBundleMessageSource getMessageSource()This method is used to get the message source.- Returns:
- the message source
-