Class DefaultAddressVerificationResultHandler
java.lang.Object
de.hybris.platform.acceleratorstorefrontcommons.forms.verification.impl.DefaultAddressVerificationResultHandler
- All Implemented Interfaces:
AddressVerificationResultHandler
@Component("addressVerificationResultHandler")
public class DefaultAddressVerificationResultHandler
extends Object
implements AddressVerificationResultHandler
Default implementation of
AddressVerificationResultHandler.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddFieldErrorsToBindingResult(Map<String, AddressVerificationErrorField> fieldErrors, org.springframework.validation.Errors bindingResult) booleanhandleResult(AddressVerificationResult verificationResult, AddressData newAddress, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel, org.springframework.validation.Errors bindingResult, boolean customerBypass, String successMsg) Given the result returned by an address verification service, determine if the address is valid or requires corrections from the user.protected booleanisResultUnknown(AddressVerificationResult verificationResult) protected voidprocessFields(Map<String, AddressVerificationErrorField> fieldErrors, org.springframework.validation.Errors bindingResult, String errorKey) protected booleanresultHasErrors(AddressVerificationResult verificationResult) protected booleanresultHasSuggestedAddresses(AddressVerificationResult verificationResult)
-
Constructor Details
-
DefaultAddressVerificationResultHandler
public DefaultAddressVerificationResultHandler()
-
-
Method Details
-
handleResult
public boolean handleResult(AddressVerificationResult verificationResult, AddressData newAddress, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel, org.springframework.validation.Errors bindingResult, boolean customerBypass, String successMsg) Description copied from interface:AddressVerificationResultHandlerGiven the result returned by an address verification service, determine if the address is valid or requires corrections from the user.- Specified by:
handleResultin interfaceAddressVerificationResultHandler- Returns:
- true if the result has errors or suggested addresses, false if it is valid.
-
resultHasErrors
-
resultHasSuggestedAddresses
-
isResultUnknown
-
addFieldErrorsToBindingResult
protected void addFieldErrorsToBindingResult(Map<String, AddressVerificationErrorField> fieldErrors, org.springframework.validation.Errors bindingResult) -
processFields
protected void processFields(Map<String, AddressVerificationErrorField> fieldErrors, org.springframework.validation.Errors bindingResult, String errorKey)
-