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, setDefaultProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public static final java.lang.String ERRTASK_NAME
public void migrateAddresses(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
migrateAddresses
in interface MigrateUserEntriesCmd
abOldUser
- The Old User, whose addresses are to be migrated.abNewUser
- The New User, who will get the new addresses.ECException
public 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.ECException
public 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.ECException
public void migrateExperimentResult(UserAccessBean abNewUser) throws ECException
abNewUser
- The New User, who owns the experiment results.ECException
public 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.ECException
public 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.ECException
public void migrateCurrentOrders(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
migrateCurrentOrders
in interface MigrateUserEntriesCmd
abOldUser
- The Old User, whose current orders are to be migrated.abNewUser
- The New User, who will get the new current orders.ECException
public void migrateInterestItems(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
migrateInterestItems
in interface MigrateUserEntriesCmd
abOldUser
- The Old User, whose interest items are to be migrated.abNewUser
- The New User, who will get the new interest items.ECException
public void migrateOrders(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
migrateOrders
in interface MigrateUserEntriesCmd
abOldUser
- The Old User, whose orders are to be migrated.abNewUser
- The New User, who will get the new orders.ECException
public void migrateOrderTemplates(UserAccessBean abOldUser, UserAccessBean abNewUser) throws ECException
migrateOrderTemplates
in interface MigrateUserEntriesCmd
abOldUser
- The Old User, whose order templates are to be migrated.abNewUser
- The New User, who will get the new order templates.ECException
public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
public void setNewUser(UserAccessBean abNewUser)
setNewUser
in interface MigrateUserEntriesCmd
abNewUser
- The new user access bean.public void setOldUser(UserAccessBean abOldUser)
setOldUser
in interface MigrateUserEntriesCmd
abOldUser
- The old user access bean.public void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class AbstractECTargetableCommand
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.
storeId
- store ID. If store ID is null, the user behavior information will not be updated.origPersonalizationId
- old Personalization IDnewPersonalizationId
- new Personalization IDECSystemException
public void mergeCart(UserAccessBean abNewUser) throws ECException
abNewUser
- The new user, who will receive the new order tempaltes.ECException