java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.security.commands.MigrateUserEntriesCmdImpl
This task command is used to migrate resources owned by one user to another. The manadorty resources that are migrated are Addresses, Current Orders, Interest Items, Order Items, Orders, and OrderTemplates.
Before executing this task command the following sets should be performed:
setOldUser setNewUser
Field Summary | |
---|---|
static java.lang.String |
ERRTASK_NAME Error task name. |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.security.commands. MigrateUserEntriesCmd |
COPYRIGHT,
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand |
COPYRIGHT |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
MigrateUserEntriesCmdImpl() |
Method Summary | |
---|---|
protected
UserAccessBean |
getNewUser() Retrieves the new user which would be recipient of migrated resources from the old user. |
protected
UserAccessBean |
getOldUser() Retrieves the old user whose resources are to be migrated to the new user. |
void |
migrateAddresses(
UserAccessBean abOldUser,
UserAccessBean abNewUser) Migrates addresses from one user to another user. |
void |
migrateCoupons(
UserAccessBean abOldUser,
UserAccessBean abNewUser) Migrates coupons from one user to another user. |
void |
migrateCurrentOrders(
UserAccessBean abOldUser,
UserAccessBean abNewUser) Migrates current orders from one user to another user. |
void |
migrateInterestItems(
UserAccessBean abOldUser,
UserAccessBean abNewUser) Migrates interest items from one user to another user. |
void |
migrateOrders(
UserAccessBean abOldUser,
UserAccessBean abNewUser) Migrates orders from one user to another user. |
void |
migrateOrderTemplates(
UserAccessBean abOldUser,
UserAccessBean abNewUser) Migrates order templates from one user to another user. |
void |
performExecute() Migrates all resources for a user. |
void |
setNewUser(
UserAccessBean abNewUser) Sets the new user which would be recipient of migrated addresses from the old user. |
void |
setOldUser(
UserAccessBean abOldUser) Sets the old user whose addresses are to be migrated to the new user. |
void |
validateParameters() Validates the parameters. |
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
isReadyToCallExecute,
reset,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Field Detail |
---|
public static final java.lang.String ERRTASK_NAME
Constructor Detail |
---|
public MigrateUserEntriesCmdImpl()
Method Detail |
---|
protected UserAccessBean getNewUser()
protected UserAccessBean getOldUser()
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 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 class
AbstractECTargetableCommand
ECException
public void setNewUser(UserAccessBean abNewUser)
setNewUser
in interface
MigrateUserEntriesCmd
abNewUser
- The new user accessbean.public void setOldUser(UserAccessBean abOldUser)
setOldUser
in interface
MigrateUserEntriesCmd
public void validateParameters() throws ECException
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECException