Class DefaultCustomerMergeExtensionHandler
java.lang.Object
org.broadleafcommerce.common.extension.AbstractExtensionHandler
org.broadleafcommerce.profile.web.core.security.DefaultCustomerMergeExtensionHandler
- All Implemented Interfaces:
org.broadleafcommerce.common.extension.ExtensionHandler,CustomerMergeExtensionHandler
public class DefaultCustomerMergeExtensionHandler
extends org.broadleafcommerce.common.extension.AbstractExtensionHandler
implements CustomerMergeExtensionHandler
-
Field Summary
Fields inherited from class org.broadleafcommerce.common.extension.AbstractExtensionHandler
enabled, priority -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.broadleafcommerce.common.extension.ExtensionResultStatusTypemerge(org.broadleafcommerce.common.extension.ExtensionResultHolder<Customer> customerHolder, org.springframework.web.context.request.WebRequest request, Customer anonymousCustomer) This allows multiple extensions to modify or copy attributes from the anonymous customer, to the customer.Methods inherited from class org.broadleafcommerce.common.extension.AbstractExtensionHandler
getPriority, isEnabled, setEnabled, setPriorityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.broadleafcommerce.common.extension.ExtensionHandler
getPriority, isEnabled
-
Constructor Details
-
DefaultCustomerMergeExtensionHandler
public DefaultCustomerMergeExtensionHandler()
-
-
Method Details
-
merge
public org.broadleafcommerce.common.extension.ExtensionResultStatusType merge(org.broadleafcommerce.common.extension.ExtensionResultHolder<Customer> customerHolder, org.springframework.web.context.request.WebRequest request, Customer anonymousCustomer) Description copied from interface:CustomerMergeExtensionHandlerThis allows multiple extensions to modify or copy attributes from the anonymous customer, to the customer. The customer is stored on the customerHolder. If the customer is modified and / or saved to the DB, the new instance must be reset on the customerHolder. Each implementation can expect that the result holder will have the latest version of the customer. Implementors are not required to save the customer. It is the responsibility of each implementation to reset the reference. Additionally and alternatively, this method allows for copying and / or modification of the request attributes from session or request. Implementors should carefully consider security implications of copying customer data.The anonymous customer may be null. If the request parameter, the customerHolder parameter, or the customer stored on the customerHolder is null, then an IllegalArgumentException should be thrown.
The return value, generally, should be ExtensionResultStatusType.HANDLED_CONTINUE. If an implementation wishes to return an exception in the customerHolder, it should instantiate and set an exception on the customerHolder and return ExtensionResultStatusType.HANDLED_STOP.
- Specified by:
mergein interfaceCustomerMergeExtensionHandler- Returns:
-