Class Constants
java.lang.Object
com.skava.marketplace.orchestration.constants.Constants
The Class Constants.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The Constant ADMIN_CONTEXT.static final String
The Constant API_KEY_SECRET_REQUEST.static final String
The Constant APP_CONFIGURATION_REQUEST.static final String
The Constant APP_STATUS.static final String
The Constant B2C_TYPE.static final String
The Constant BUSINESS_ID.static final String
The Constant CAMEL_HTTP_RESPONSE_CODE.static final String
The Constant CLIENT_ERROR.static final String
The Constant CREATE_APIKEY_SECRETKEY_RESPONSE.static final String
The Constant CREATE_APP_CONFIG.static final String
The Constant CREATE_APP_CONFIG_RESPONSE.static final String
The Constant CREATE_APP_DESCRIPTION.static final String
The Constant CREATE_APP_DESCRIPTION_RESPONSE.static final String
The Constant CREATE_APP_REQUEST.static final String
The Constant CREATE_APP_RESPONSE.static final String
The Constant CREATE_UI_JSON_INFO_RESPONSE.static final String
The Constant DEFAULT_LOCALE.static final String
The Constant ERR_HYSTRIX_TIMEOUT.static final String
The Constant FALSE_CONST.static final String
The Constant FILE_EXTENSION.static final String
The Constant FILE_TEXT.static final String
The Constant INVALID_URL.static final String
The Constant KEY_LOCALE.static final String
The Constant MSG_HYSTRIX_TIMEOUT.static final String
The Constant PROP_APPLYSHIPPINGOBJECT.static final String
The Constant PROP_DELIVERYDETAILS.static final String
The Constant ROLE_ACCOUNT_BUYER.static final String
The Constant TRUE_CONST.static final String
The Constant UI_JSON_INFO_REQUEST.static final String
The Constant X_APP_BUSINESS_ID.static final String
The Constant X_APP_ID.static final String
The Constant X_APP_KEY.static final String
The Constant X_APP_VERSION. -
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) Gets the message.static String
getMessage
(String responseCode, org.springframework.context.MessageSource messageSource, String defaultMessage, String locale) Gets the message.static org.springframework.context.support.ResourceBundleMessageSource
Gets the message source.static void
throwValidateException
(String errorCode, org.springframework.context.MessageSource messageSource, String locale) Throw validate exception.
-
Field Details
-
CAMEL_HTTP_RESPONSE_CODE
The Constant CAMEL_HTTP_RESPONSE_CODE.- See Also:
-
DEFAULT_LOCALE
The Constant DEFAULT_LOCALE.- See Also:
-
KEY_LOCALE
The Constant KEY_LOCALE.- 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
The Constant ROLE_ACCOUNT_BUYER.- See Also:
-
B2C_TYPE
The Constant B2C_TYPE.- See Also:
-
CREATE_APP_REQUEST
The Constant CREATE_APP_REQUEST.- See Also:
-
CREATE_APP_CONFIG
The Constant CREATE_APP_CONFIG.- See Also:
-
CREATE_APP_DESCRIPTION
The Constant CREATE_APP_DESCRIPTION.- See Also:
-
UI_JSON_INFO_REQUEST
The Constant UI_JSON_INFO_REQUEST.- See Also:
-
X_APP_ID
The Constant X_APP_ID.- See Also:
-
X_APP_VERSION
The Constant X_APP_VERSION.- See Also:
-
X_APP_BUSINESS_ID
The Constant X_APP_BUSINESS_ID.- See Also:
-
CREATE_APP_RESPONSE
The Constant CREATE_APP_RESPONSE.- See Also:
-
CREATE_APP_CONFIG_RESPONSE
The Constant CREATE_APP_CONFIG_RESPONSE.- See Also:
-
CREATE_APP_DESCRIPTION_RESPONSE
The Constant CREATE_APP_DESCRIPTION_RESPONSE.- See Also:
-
CREATE_UI_JSON_INFO_RESPONSE
The Constant CREATE_UI_JSON_INFO_RESPONSE.- See Also:
-
CREATE_APIKEY_SECRETKEY_RESPONSE
The Constant CREATE_APIKEY_SECRETKEY_RESPONSE.- See Also:
-
TRUE_CONST
The Constant TRUE_CONST.- See Also:
-
FALSE_CONST
The Constant FALSE_CONST.- See Also:
-
FILE_EXTENSION
The Constant FILE_EXTENSION.- See Also:
-
INVALID_URL
The Constant INVALID_URL.- See Also:
-
API_KEY_SECRET_REQUEST
The Constant API_KEY_SECRET_REQUEST.- See Also:
-
APP_STATUS
The Constant APP_STATUS.- See Also:
-
BUSINESS_ID
The Constant BUSINESS_ID.- See Also:
-
X_APP_KEY
The Constant X_APP_KEY.- See Also:
-
ADMIN_CONTEXT
The Constant ADMIN_CONTEXT.- See Also:
-
FILE_TEXT
The Constant FILE_TEXT.- See Also:
-
CLIENT_ERROR
The Constant CLIENT_ERROR.- See Also:
-
APP_CONFIGURATION_REQUEST
The Constant APP_CONFIGURATION_REQUEST.- See Also:
-
-
Method Details
-
getMessage
public static String getMessage(String responseCode, org.springframework.context.MessageSource messageSource, String locale) Gets the message.- Parameters:
responseCode
- holds Valid responseCodemessageSource
- hold valid messageSourcelocale
- holds Valid locale- Returns:
- String value as getMessage
-
getMessage
public static String getMessage(String responseCode, org.springframework.context.MessageSource messageSource, String defaultMessage, String locale) Gets the message.- Parameters:
responseCode
- holds ResponseCode as StringmessageSource
- holds messageSourcedefaultMessage
- holds defaultMessagelocale
- holds valid locale- Returns:
- String as a message
-
getLocaleOrDefault
Gets the locale or default.- Parameters:
locale
- holds valid locale- Returns:
- Locale Valid Locale
-
throwValidateException
public static void throwValidateException(String errorCode, org.springframework.context.MessageSource messageSource, String locale) Throw validate exception.- Parameters:
errorCode
- holds Error CodemessageSource
- holds MessageSourcelocale
- holds locale
-
getMessageSource
public static org.springframework.context.support.ResourceBundleMessageSource getMessageSource()Gets the message source.- Returns:
- bean of ResourceBundleMessageSource
-