com.ibm.commerce.tools.optools.returns.commands
Class CSRDisplayRefundPaymentInfoCmdImpl

java.lang.Object
  CacheableCommandImpl
      com.ibm.commerce.command.AbstractECTargetableCommand
          com.ibm.commerce.command.TaskCommandImpl
              com.ibm.commerce.command.BusinessPolicyCommandImpl
                  com.ibm.commerce.tools.optools.returns.commands.CSRDisplayRefundPaymentInfoCmdImpl
All Implemented Interfaces:
BusinessPolicyCommand, CSRDisplayRefundPaymentInfoCmd, ECCommand, ECTargetableCommand, TaskCommand
Direct Known Subclasses:
CSRDisplayRefundByCreditCmdImpl, CSRDisplayRefundByOriginalPaymentCmdImpl

public abstract class CSRDisplayRefundPaymentInfoCmdImpl
extends BusinessPolicyCommandImpl
implements CSRDisplayRefundPaymentInfoCmd

Base class for the display refund mechanism command classes. Subclasses implement details specific to a particular mechanism.

The selected refund mechanism for an RMA is set by passing in a refund policy id to ReturnProcessCmdImpl. To determine which mechanism was chosen, use RMAAccessBean.getPolicyId.

Utilizes these access beans

See Also:
Serialized Form

Field Summary
protected java.util.Vector creditAccountInformation
protected RMAAccessBean iRMA
Fields inherited from class com.ibm.commerce.command.BusinessPolicyCommandImpl
policyId, requestProperties
Fields inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
commandContext
Fields inherited from interface com.ibm.commerce.tools.optools.returns.commands.CSRDisplayRefundPaymentInfoCmd
COPYRIGHT, defaultCommandClassName, NAME
Fields inherited from interface com.ibm.commerce.command.ECCommand
defaultCommandClassName
Constructor Summary
CSRDisplayRefundPaymentInfoCmdImpl()
Method Summary
protected void addInfoToVector(java.util.Vector v, java.lang.String infoName, java.lang.String labelKey, java.lang.String value)
Adds informations to the output data structure of the command.
java.util.Vector getCreditAccountInformation()
Gets refund mechanism information for the set RMA.
RMAAccessBean getRMA()
Gets the RMA set for the command
void setRMA(RMAAccessBean newRMA)
Sets the RMA for which to get refund mechanism information.
Methods inherited from class com.ibm.commerce.command.BusinessPolicyCommandImpl
getPolicyId, getRequestProperties, setPolicyId, setRequestProperties
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, performExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.ibm.commerce.tools.optools.returns.commands.CSRDisplayRefundPaymentInfoCmd
populateCreditAccountInformation
Methods inherited from interface com.ibm.commerce.command.BusinessPolicyCommand
getPolicyId, getRequestProperties, setPolicyId, setRequestProperties
Field Detail

iRMA

protected RMAAccessBean iRMA

creditAccountInformation

protected java.util.Vector creditAccountInformation
Constructor Detail

CSRDisplayRefundPaymentInfoCmdImpl

public CSRDisplayRefundPaymentInfoCmdImpl()
Method Detail

addInfoToVector

protected void addInfoToVector(java.util.Vector v,
                               java.lang.String infoName,
                               java.lang.String labelKey,
                               java.lang.String value)
Adds informations to the output data structure of the command. Classes which extend CSRDisplayRefundPaymentInfoCmdImpl should use this method to build refund mechanism information in the proper format.
Parameters:
v - output data structure
infoName - information name. For example if the credit card number is added using this method the value passed to this parameter would be "CARD_NUMBER".
labelKey - label key in the ReturnsNLS.properties file.
value - value of the key; for example the credit card number.

getCreditAccountInformation

public java.util.Vector getCreditAccountInformation()
Description copied from interface: CSRDisplayRefundPaymentInfoCmd
Gets refund mechanism information for the set RMA. Returns a Vector of Hashtables that contain Hashtables. A sample usage of the output is as follows:
   Vector creditInfo  = getCreditAccountInformation()

  if ( creditInfo != null && creditInfo.size() != 0 )
  {
     for (int i = 0; i < creditInfo.size(); i++ )
     {
    
        Hashtable ht1 = (Hashtable) creditInfo.elementAt(i);
        Enumeration enum = ht1.elements();
        Hashtable ht2 = (Hashtable) enum.nextElement(); // only 1 element in this hashtable
        String labelKey = (String) ht2.get("LABEL_KEY"); // gets the label key from the ReturnNLS.properties file
        String value = (String) ht2.get("VALUE");  // gets the value
     }
  }   
Specified by:
getCreditAccountInformation in interface CSRDisplayRefundPaymentInfoCmd

getRMA

public RMAAccessBean getRMA()
Gets the RMA set for the command
Returns:
RMA access bean

setRMA

public void setRMA(RMAAccessBean newRMA)
Description copied from interface: CSRDisplayRefundPaymentInfoCmd
Sets the RMA for which to get refund mechanism information.
Specified by:
setRMA in interface CSRDisplayRefundPaymentInfoCmd
Parameters:
newRMA - RMA access bean to use

Feedback