Class DefaultAddressVerificationService
java.lang.Object
de.hybris.platform.commerceservices.address.impl.DefaultAddressVerificationService
- All Implemented Interfaces:
AddressVerificationService<AddressVerificationDecision,AddressFieldErrorData<AddressFieldType, AddressErrorCode>>
public class DefaultAddressVerificationService
extends Object
implements AddressVerificationService<AddressVerificationDecision,AddressFieldErrorData<AddressFieldType,AddressErrorCode>>
Default implementation of
AddressVerificationService to be used in the absence of an external service.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddErrorToVerificationResult(String titleCode, String missing, List<AddressFieldErrorData<AddressFieldType, AddressErrorCode>> errors) protected AddressVerificationResultData<AddressVerificationDecision,AddressFieldErrorData<AddressFieldType, AddressErrorCode>> protected BaseStoreServicebooleanUsed to determine if the customer is allowed to ignore the address suggestions of this AddressVerificationService and proceed with checkout.voidsetBaseStoreService(BaseStoreService baseStoreService) protected voidvalidateAddressFields(AddressVerificationResultData<AddressVerificationDecision, AddressFieldErrorData<AddressFieldType, AddressErrorCode>> result, AddressModel address) Validates each field input in an AddressForm.AddressVerificationResultData<AddressVerificationDecision,AddressFieldErrorData<AddressFieldType, AddressErrorCode>> verifyAddress(AddressModel addressModel) This method takes in an AddressModel, verifies it using the chosen implementation and returns an AddressVerificationResultData.
-
Field Details
-
ACCEPT
- See Also:
-
REJECT
- See Also:
-
TITLE_CODE
- See Also:
-
FIRST_NAME
- See Also:
-
LAST_NAME
- See Also:
-
ADDRESS_LINE_1
- See Also:
-
ADDRESS_LINE_2
- See Also:
-
REGION
- See Also:
-
ZIP_CODE
- See Also:
-
CITY
- See Also:
-
COUNTRY
- See Also:
-
MISSING
- See Also:
-
INVALID
- See Also:
-
-
Constructor Details
-
DefaultAddressVerificationService
public DefaultAddressVerificationService()
-
-
Method Details
-
verifyAddress
public AddressVerificationResultData<AddressVerificationDecision,AddressFieldErrorData<AddressFieldType, verifyAddressAddressErrorCode>> (AddressModel addressModel) Description copied from interface:AddressVerificationServiceThis method takes in an AddressModel, verifies it using the chosen implementation and returns an AddressVerificationResultData.- Specified by:
verifyAddressin interfaceAddressVerificationService<AddressVerificationDecision,AddressFieldErrorData<AddressFieldType, AddressErrorCode>> - Parameters:
addressModel- the address to be verified.- Returns:
- an AddressVerificationResultData that holds the verification data.
-
isCustomerAllowedToIgnoreSuggestions
public boolean isCustomerAllowedToIgnoreSuggestions()Description copied from interface:AddressVerificationServiceUsed to determine if the customer is allowed to ignore the address suggestions of this AddressVerificationService and proceed with checkout.- Specified by:
isCustomerAllowedToIgnoreSuggestionsin interfaceAddressVerificationService<AddressVerificationDecision,AddressFieldErrorData<AddressFieldType, AddressErrorCode>> - Returns:
- true if the user can bypass address suggestions, false if not.
-
validateAddressFields
protected void validateAddressFields(AddressVerificationResultData<AddressVerificationDecision, AddressFieldErrorData<AddressFieldType, AddressErrorCode>> result, AddressModel address) Validates each field input in an AddressForm. Field validation is usually left up to the external address verification service so the mock must perform this function. -
addErrorToVerificationResult
protected void addErrorToVerificationResult(String titleCode, String missing, List<AddressFieldErrorData<AddressFieldType, AddressErrorCode>> errors) -
createFieldError
-
createVerificationResult
protected AddressVerificationResultData<AddressVerificationDecision,AddressFieldErrorData<AddressFieldType, createVerificationResult()AddressErrorCode>> -
getBaseStoreService
-
setBaseStoreService
-