Package com.skava.address.constant
Class CollectionResponseCodes
java.lang.Object
com.skava.address.constant.CollectionResponseCodes
- Author:
- Infosys Equinox Class CollectionResponseCodes This class builds and maintains all the response codes that are generated by the address collection maintenance operation. Also defines constants that are used by the address collection maintenance operations. getMessage method helps in providing appropriate response messages for the response codes that are build. Response message are provided using the message source bundle and locale.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The following fields lists the various status of the collection entity in the address validation service.static final String
Error Responsesstatic final String
Success Responsesstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
The following fields lists the constants that identifies the default collection properties for the address collectionstatic final String
static final String
static final String
Errorstatic final String
static final String
static final String
static final String
Invalidstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Successstatic final String
Createstatic final String
Loadstatic final String
static final String
Getstatic final String
Updatestatic final String
static final String
static final String
static final String
The following field are used to map the build errors for the address validation service response codesstatic final String
The following fields lists the constants that are used for achieving the fallback process in case of the service failure.static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getMessage
(String responseCode, Object[] args, org.springframework.context.MessageSource messageSource, String locale) getMessage This method provides the response message for the response code fed as input.
-
Field Details
-
SERVICE_COLLECTION
The following field are used to map the build errors for the address validation service response codes- See Also:
-
ENTITY_COLLECTION
- See Also:
-
OPERATION_CREATE
Create- See Also:
-
OPERATION_LOAD
Get- See Also:
-
OPERATION_FIND_ALL
- See Also:
-
OPERATION_UPDATE
Update- See Also:
-
OPERATION_UPDATE_PATCH
- See Also:
-
OPERATION_DELETE
Load- See Also:
-
OPERATION_COMMON
Success- See Also:
-
SUCCESS_COLLECTION
- See Also:
-
ERROR_ALREADY_EXISTS
Error- See Also:
-
ERROR_NOT_FOUND
- See Also:
-
ERROR_VALIDATION
- See Also:
-
NAME_NOT_GIVEN
- See Also:
-
INVALID_BUSINESS_ID
- See Also:
-
NO_SEARCH_RESULT_FOUND
- See Also:
-
PATCH_UPDATE_FAILURE
- See Also:
-
INVALID_PROPERTY
- See Also:
-
INVALID_PAGE_SIZE
- See Also:
-
INVALID_STATUS
- See Also:
-
PARTNER_NOT_FOUND
- See Also:
-
ERROR_INVALID_INPUT
Invalid- See Also:
-
ERROR_UNKNOWN
- See Also:
-
COLLECTION_CREATE_SUCCESS
Success Responses- See Also:
-
COLLECTION_LOAD_SUCCESS
- See Also:
-
COLLECTION_UPDATE_SUCCESS
- See Also:
-
COLLECTION_PATCH_UPDATE_SUCCESS
- See Also:
-
COLLECTION_DELETE_SUCCESS
- See Also:
-
COLLECTION_FIND_ALL_SUCCESS
- See Also:
-
COLLECTION_ALREADY_EXISTS
Error Responses- See Also:
-
COLLECTION_NOT_EXISTS
- See Also:
-
ERROR_COLLECTION_NAME_NOT_GIVEN
- See Also:
-
ERROR_INVALID_BUSINESS_ID
- See Also:
-
ERROR_NO_SEARCH_RESULT_FOUND
- See Also:
-
COLLECTION_PATCH_UPDATE_FAILURE
- See Also:
-
ERROR_INVALID_COLLECTION_PROPERTIES
- See Also:
-
ERROR_INVALID_PAGE_SIZE
- See Also:
-
ERROR_INVALID_STATUS
- See Also:
-
ERROR_PARTNER_NOT_FOUNT
- See Also:
-
ACTIVE
The following fields lists the various status of the collection entity in the address validation service. ACTIVE - Means the collection is active and open for business. INACTIVE - Means the collection is deactivated and is closed for business. DELETED - This status used to achieve the soft delete functionality. The collection once deleted will remain dormant. It cannot go back to ACTIVE or INACTIVE status.- See Also:
-
INACTIVE
- See Also:
-
DELETED
- See Also:
-
STR_METHOD_FALL_BACK
The following fields lists the constants that are used for achieving the fallback process in case of the service failure.- See Also:
-
STR_METHOD_FALL_BACK_COMMAND_KEY
- See Also:
-
DEFAULTPROPERTIESFILE
The following fields lists the constants that identifies the default collection properties for the address collection- See Also:
-
-
Constructor Details
-
CollectionResponseCodes
protected CollectionResponseCodes()Protected super constructor
-
-
Method Details
-
getMessage
public static String getMessage(String responseCode, Object[] args, org.springframework.context.MessageSource messageSource, String locale) getMessage This method provides the response message for the response code fed as input. The response message is built using- Parameters:
responseCode
- Response code whose message needs to be determinedargs
- Arguments array for getting the messagemessageSource
- Response message source, where response messages for all response codes are maintained.locale
- Locale for the response message to be returned. Local will default to en_US, if response message is not available for the locale fed as input.- Returns:
- Returns the response message for the response code based on the values of message source and locale.
-