public class MigrateUserEntriesCmdImpl extends TaskCommandImpl implements MigrateUserEntriesCmd
This task command is used to migrate resources owned by one user to another. The mandatory resources that are migrated are Addresses, Current Orders, Interest Items, Order Items, Orders, and Order templates.
By default, this command will not merge the shopping cart for the 2 users, but it can be configured to do so by:
Before executing this task command the following sets should be performed:
Modifier and Type | Field and Description |
---|---|
static java.lang.String | ERRTASK_NAME
Error task name.
|
Constructor and Description |
---|
MigrateUserEntriesCmdImpl() |
Modifier and Type | Method and Description |
---|---|
protected UserAccessBean | getNewUser()
This method retrieves the new user who is the recipient of migrated resources from the old user.
|
protected UserAccessBean | getOldUser()
This method retrieves the old user whose resources are to be migrated to the new user.
|
protected java.util.Enumeration | getOrdersToMigrate(UserAccessBean abOldUser)
The method gets the orders to be migrated from one user to another user.
|
void | mergeCart(UserAccessBean abNewUser)
This method is used to merge the cart of the user.
|
void | migrateAddresses(UserAccessBean abOldUser, UserAccessBean abNewUser)
This method migrates addresses from one user to another user.
|
void | migrateCoupons(UserAccessBean abOldUser, UserAccessBean abNewUser)
This method migrates coupons from one user to another user.
|
void | migrateCurrentOrders(UserAccessBean abOldUser, UserAccessBean abNewUser)
This method migrates the current orders from one user to another user.
|
void | migrateExperimentResult(UserAccessBean abNewUser)
This method migrates experiment results from a generic or guest user to the given new user.
|
void | migrateExperimentResult(UserAccessBean abOldUser, UserAccessBean abNewUser)
This method migrates experiment results from a generic or guest user to the given new user.
|
void | migrateInterestItems(UserAccessBean abOldUser, UserAccessBean abNewUser)
This method migrates interest items from one user to another user.
|
protected void | migrateOrderItem(OrderItemAccessBean abOrderItem, UserAccessBean abNewUser, CommandContext newUserCmdCtx)
This method migrates an order item to a new user.
|
void | migrateOrders(UserAccessBean abOldUser, UserAccessBean abNewUser)
This method migrates orders from one user to another user.
|
void | migrateOrderTemplates(UserAccessBean abOldUser, UserAccessBean abNewUser)
This method migrates order templates from one user to another user.
|
void | migratePersonalization(UserAccessBean abOldUser, UserAccessBean abNewUser)
This method migrates the customer segment information for a customer.
|
static void | migratePersonalizationId(java.lang.Integer storeId, java.lang.String origPersonalizationId, java.lang.String newPersonalizationId)
Reserved for IBM internal use.
|
void | migratePhoenixCoupon(UserAccessBean abOldUser, UserAccessBean abNewUser)
This method migrates Phoenix Coupons.
|
void | performExecute()
This method migrates all resources for a user.
|
protected boolean | resolveMergeCartFlag()
Get the Merge cart flag from configuration and request properties.
|
void | setNewUser(UserAccessBean abNewUser)
This method sets the new user who is the recipient of the migrated resources from the old user.
|
void | setOldUser(UserAccessBean abOldUser)
This method sets the old user whose resources are to be migrated to the new user.
|
void | validateParameters()
This method validates the parameters by ensuring that the new user and the old user parameters have been set.
|
public static final java.lang.String ERRTASK_NAME
protected UserAccessBean getNewUser()
protected UserAccessBean getOldUser()
public void migrateAddresses(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
public void migrateCoupons(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
public void migratePersonalization(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
public void migrateExperimentResult(UserAccessBean abNewUser) throws ECException
public void migrateExperimentResult(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
public void migratePhoenixCoupon(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
public void migrateCurrentOrders(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
public void migrateInterestItems(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
public void migrateOrders(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
protected void migrateOrderItem(OrderItemAccessBean abOrderItem, UserAccessBean abNewUser, CommandContext newUserCmdCtx) throws ECException
protected java.util.Enumeration getOrdersToMigrate(UserAccessBean abOldUser) throws ECException
public void migrateOrderTemplates(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
public void performExecute() throws ECException
public void setNewUser(UserAccessBean abNewUser)
public void setOldUser(UserAccessBean abOldUser)
public void validateParameters() throws ECException
public static void migratePersonalizationId(java.lang.Integer storeId, java.lang.String origPersonalizationId, java.lang.String newPersonalizationId) throws ECSystemException
This method migrates the data associated with an original personalization ID to a new personalization ID. This method is expected to be called when a guest user does operations on the site which are being tracked against an original personalization ID, and then later registers. Once the user registers, a new personalization ID is assigned to the user if the old personalization ID is already associated with an existing registered user in the site. In this case, any information that was tracked against the old personalization ID needs to be migrated to the new personalization ID.
protected boolean resolveMergeCartFlag()
public void mergeCart(UserAccessBean abNewUser) throws ECException