com.ibm.commerce.utf.commands
Class DeleteOrderItemPAttributeTCCmdImpl
java.lang.Object
|
+--com.ibm.commerce.command.AbstractECCommand
|
+--com.ibm.commerce.command.TaskCommandImpl
|
+--com.ibm.commerce.utf.commands.DeleteOrderItemPAttributeTCCmdImpl
- All Implemented Interfaces:
- DeleteOrderItemPAttributeTCCmd, ECCommand, TaskCommand
- public class DeleteOrderItemPAttributeTCCmdImpl
- extends TaskCommandImpl
- implements DeleteOrderItemPAttributeTCCmd
Deletes Terms and Conditions of type "OrderItemPAttribute".
Behaviour
- Verifies that a trading ID has been provided.
- Finds a list of all the TCs of type "OrderItemPAttribute" for the given trading ID.
- Deletes every TC from the above list, which is found in the incoming tcVector.
- If the incoming tcVector is empty, deletes all the "OrderItemPAttribute" TCs found for the trading ID.
Method Summary |
void |
deleteAllOrderItemPAttributeTCs()
Finds all the terms and conditions of type "OrderPAttribute" for the given trading agreement
ID and deletes them. |
void |
deleteIncomingTCs()
Finds all the terms and conditions of type "OrderItemPAttribute" for the given trading agreement
ID. |
java.util.Vector |
getTcVector()
Retrieves the list of IDs of terms and conditions to be deleted. |
java.lang.Long |
getTradingId()
Retrieves the trading agreement ID. |
void |
performExecute()
Calls the deleteAllOrderItemPAttributeTCs method if the incoming
tcVector is null. |
void |
setTcVector(java.util.Vector newTcVector)
Stores the list of IDs corresponding to the term and conditions to be deleted. |
void |
setTradingId(java.lang.Long newTradingId)
Stores the trading ID. |
void |
validateParameters()
Checks for an incoming trading agreement ID. |
Methods inherited from class com.ibm.commerce.command.AbstractECCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
tcVector
public java.util.Vector tcVector
tradingId
public java.lang.Long tradingId
DeleteOrderItemPAttributeTCCmdImpl
public DeleteOrderItemPAttributeTCCmdImpl()
deleteAllOrderItemPAttributeTCs
public void deleteAllOrderItemPAttributeTCs()
throws ECException
- Finds all the terms and conditions of type "OrderPAttribute" for the given trading agreement
ID and deletes them.
- Throws:
ECApplicationException
- If an application error occurs while deleting TCs.ECSystemException
- If a system error occurs while deleting TCs.
deleteIncomingTCs
public void deleteIncomingTCs()
throws ECException
- Finds all the terms and conditions of type "OrderItemPAttribute" for the given trading agreement
ID. Out of these, deletes all the TCs with IDs that are in the incoming tcVector.
- Throws:
ECApplicationException
- If an application error occurs while deleting TCs.ECSystemException
- If a system error occurs while deleting TCs.
getTcVector
public java.util.Vector getTcVector()
- Retrieves the list of IDs of terms and conditions to be deleted.
- Returns:
- The list of TC IDs.
getTradingId
public java.lang.Long getTradingId()
- Retrieves the trading agreement ID.
- Returns:
- The trading agreement ID.
performExecute
public void performExecute()
throws ECException
- Calls the deleteAllOrderItemPAttributeTCs method if the incoming
tcVector is null. Otherwise, calls the deleteIncomingTCs method.
- Specified by:
performExecute
in interface ECCommand
- Overrides:
performExecute
in class AbstractECCommand
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Throws:
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.
setTcVector
public void setTcVector(java.util.Vector newTcVector)
- Stores the list of IDs corresponding to the term and conditions to be deleted.
- Specified by:
setTcVector
in interface DeleteOrderItemPAttributeTCCmd
- Parameters:
newTcVector
- The list of term and condition IDs.
setTradingId
public void setTradingId(java.lang.Long newTradingId)
- Stores the trading ID.
- Specified by:
setTradingId
in interface DeleteOrderItemPAttributeTCCmd
- Parameters:
newTradingid
- The trading ID.
validateParameters
public void validateParameters()
throws ECException
- Checks for an incoming trading agreement ID.
- Specified by:
validateParameters
in interface ECCommand
- Overrides:
validateParameters
in class AbstractECCommand
- Throws:
ECApplicationException
- If the trading agreement ID has not been provided.