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.
|
COMMIT_TRANSACTION_KEY, defaultCommandClassName, NAME| Constructor and Description |
|---|
MigrateUserEntriesCmdImpl() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.
|
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.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiesexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCachegetCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicyequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCachegetCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputPropertiescheckIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiespublic static final java.lang.String ERRTASK_NAME
public void migrateAddresses(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
migrateAddresses in interface MigrateUserEntriesCmdabOldUser - The Old User, whose addresses are to be migrated.abNewUser - The New User, who will get the new addresses.ECExceptionpublic void migrateCoupons(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
abOldUser - The Old User, whose coupons are to be migrated.abNewUser - The New User, who will get the new coupons.ECExceptionpublic void migratePersonalization(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
abOldUser - The old user, who may have entries in the DMMBRGRPPZN database table.abNewUser - The new user, to whom the DMMBRGRPPZN entries should be copied.ECExceptionpublic void migrateExperimentResult(UserAccessBean abNewUser) throws ECException
abNewUser - The New User, who owns the experiment results.ECExceptionpublic void migrateExperimentResult(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
abOldUser - The Old User, who owns the experiment results.abNewUser - The New User, who owns the experiment results.ECExceptionpublic void migratePhoenixCoupon(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
abOldUser - - the old user, whose coupons are to be migrated.abNewUser - - the new user, who will receive the new coupons.ECExceptionpublic void migrateCurrentOrders(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
migrateCurrentOrders in interface MigrateUserEntriesCmdabOldUser - The Old User, whose current orders are to be migrated.abNewUser - The New User, who will get the new current orders.ECExceptionpublic void migrateInterestItems(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
migrateInterestItems in interface MigrateUserEntriesCmdabOldUser - The Old User, whose interest items are to be migrated.abNewUser - The New User, who will get the new interest items.ECExceptionpublic void migrateOrders(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
migrateOrders in interface MigrateUserEntriesCmdabOldUser - The Old User, whose orders are to be migrated.abNewUser - The New User, who will get the new orders.ECExceptionpublic void migrateOrderTemplates(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
migrateOrderTemplates in interface MigrateUserEntriesCmdabOldUser - The Old User, whose order templates are to be migrated.abNewUser - The New User, who will get the new order templates.ECExceptionpublic void performExecute()
throws ECException
performExecute in interface ECCommandperformExecute in interface com.ibm.websphere.command.TargetableCommandperformExecute in class AbstractECTargetableCommandECExceptionpublic void setNewUser(UserAccessBean abNewUser)
setNewUser in interface MigrateUserEntriesCmdabNewUser - The new user access bean.public void setOldUser(UserAccessBean abOldUser)
setOldUser in interface MigrateUserEntriesCmdabOldUser - The old user access bean.public void validateParameters()
throws ECException
validateParameters in interface ECCommandvalidateParameters in class AbstractECTargetableCommandECExceptionpublic 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.
storeId - store ID. If store ID is null, the user behavior information will not be updated.origPersonalizationId - old Personalization IDnewPersonalizationId - new Personalization IDECSystemExceptionpublic void mergeCart(UserAccessBean abNewUser) throws ECException
abNewUser - The new user, who will receive the new order tempaltes.ECException