com.ibm.commerce.utf.commands
Class ModifyOrderItemPAttributeTCCmdImpl

java.lang.Object
  |
  +--com.ibm.commerce.command.AbstractECCommand
        |
        +--com.ibm.commerce.command.TaskCommandImpl
              |
              +--com.ibm.commerce.utf.commands.ModifyOrderItemPAttributeTCCmdImpl
All Implemented Interfaces:
ECCommand, ModifyOrderItemPAttributeTCCmd, TaskCommand

public class ModifyOrderItemPAttributeTCCmdImpl
extends TaskCommandImpl
implements ModifyOrderItemPAttributeTCCmd

Task command implementation that updates terms and conditions of type "OrderItemPAttribute".


Field Summary
 java.lang.Integer languageId
           
 java.util.Vector pAttributeVector
           
 java.lang.Long tradingId
           
 
Fields inherited from class com.ibm.commerce.command.AbstractECCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.utf.commands.ModifyOrderItemPAttributeTCCmd
COPYRIGHT, defaultCommandClassName, NAME
 
Constructor Summary
ModifyOrderItemPAttributeTCCmdImpl()
          ModifyOrderCommentsTCCmdImpl constructor comment.
 
Method Summary
 java.lang.Integer getLanguageId()
          Retrieves the language identifier.
 java.util.Vector getPAttributeVector()
          Retrieves the list of personalized attributes.
 java.lang.Long getTradingId()
          Retrieves the trading agreement ID.
 void performExecute()
          Updates the associated term and condition for each personalization attribute.
This method does the following for every personalization attribute:
Determines if a value has been provided. Determines if the associated tc ID has been provided. Composes an XML element for the OrderItempAttribute TC that conforms to the Trading DTD. Updates the OrderItemPAttribute TC.
 void setLanguageId(java.lang.Integer newLanguageId)
          Stores the language ID.
 void setPAttributeVector(java.util.Vector newPAttributeVector)
          Save the incoming vector of personalization attributes.
 void setTradingId(java.lang.Long newTradingId)
          Save the incoming trading agreement identifier.
 void validateParameters()
          This method does the following:
Verifies that a trading agreement ID has been provided and exists. Verifies that a vector of personalized attributes has been provided.
 
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
 

Field Detail

languageId

public java.lang.Integer languageId

pAttributeVector

public java.util.Vector pAttributeVector

tradingId

public java.lang.Long tradingId
Constructor Detail

ModifyOrderItemPAttributeTCCmdImpl

public ModifyOrderItemPAttributeTCCmdImpl()
ModifyOrderCommentsTCCmdImpl constructor comment.
Method Detail

getLanguageId

public java.lang.Integer getLanguageId()
Retrieves the language identifier.
Returns:
The language ID.

getPAttributeVector

public java.util.Vector getPAttributeVector()
Retrieves the list of personalized attributes.
Returns:
The list of personzalised attributes.

getTradingId

public java.lang.Long getTradingId()
Retrieves the trading agreement ID.
Returns:
The ID of the trading agreement.

performExecute

public void performExecute()
                    throws ECException
Updates the associated term and condition for each personalization attribute.
This method does the following for every personalization attribute:

Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECCommand
Throws:
ECApplicationException - If no value was provided for a personalization attribute.
If the associated tc ID was not provided for a personalization attribute.
If an application error occurs while updating the TC.
ECSystemException - If a system error occurs while updating the TC.

setLanguageId

public void setLanguageId(java.lang.Integer newLanguageId)
Stores the language ID.
Specified by:
setLanguageId in interface ModifyOrderItemPAttributeTCCmd
Parameters:
newLanguageId - The language ID.

setPAttributeVector

public void setPAttributeVector(java.util.Vector newPAttributeVector)
Save the incoming vector of personalization attributes.
Specified by:
setPAttributeVector in interface ModifyOrderItemPAttributeTCCmd
Parameters:
newPAttributeVector - java.util.Vector

setTradingId

public void setTradingId(java.lang.Long newTradingId)
Save the incoming trading agreement identifier.
Specified by:
setTradingId in interface ModifyOrderItemPAttributeTCCmd
Parameters:
newTradingId - The trading agreement ID.

validateParameters

public void validateParameters()
                        throws ECException
This method does the following:
  1. Verifies that a trading agreement ID has been provided and exists.
  2. Verifies that a vector of personalized attributes has been provided. Each vector element is required to have the ID of the term and condition it represents.

Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECCommand
Throws:
ECApplicationException -
  • If the trading agreement ID has not been provided.
  • If the vector of personalized attributes has not been provided.