com.ibm.commerce.payment.commands
Class GetPaymentInfoCmdImpl

java.lang.Object
  CacheableCommandImpl
      com.ibm.commerce.command.AbstractECTargetableCommand
          com.ibm.commerce.command.ControllerCommandImpl
              com.ibm.commerce.payment.commands.GetPaymentInfoCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, GetPaymentInfoCmd, Protectable

public class GetPaymentInfoCmdImpl
extends ControllerCommandImpl
implements GetPaymentInfoCmd

This GetPaymentInfoCmd Controller Command Implementation constructs a string of name-value pairs to be appended as query string to the specified URL.

The name-value pairs include payment information for the specified Order from the OrdPayMthd table.

The payment information to be included are:

This command uses the following AccessBeans:

This command does not call other TaskCommand.

See Also:
Serialized Form

Field Summary
Fields inherited from class com.ibm.commerce.command.ControllerCommandImpl
requestProperties, responseProperties, retriable, viewReqProperties
Fields inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
commandContext
Fields inherited from interface com.ibm.commerce.payment.commands.GetPaymentInfoCmd
defaultCommandClassName, NAME
Constructor Summary
GetPaymentInfoCmdImpl()
Method Summary
protected OrderAccessBean getOrderAccessBean()
Returns the OrderAccessBean representing the order whose payment information in the ORDPAYMTHD table is requested.
protected java.lang.Long getOrderId()
Returns the ID of the order whose payment information in the ORDPAYMTHD table is requested.
AccessVector getResources()
Returns the resources accessed by this command.
protected java.lang.String getUrl()
Gets the URL property of the command.
boolean isReadyToCallExecute()
This method is called by the Command Framework to check if all basic mandatory parameters have been set for this command.
void performExecute()
Performs the main business logic of the command.
void reset()
Resets the instance variables of the command.
void setOrderId(java.lang.Long orderId)
Sets the orderId property of the command.
void setUrl(java.lang.String astrUrl)
Sets the URL property of the command.
void validateParameters()
Checks the validity of supplied parameters.
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setRequestProperties, setResponseProperties, setRetriable, setViewInputProperties
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, 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.ControllerCommand
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRequestProperties, setRetriable, setViewInputProperties
Methods inherited from interface com.ibm.commerce.command.AccCommand
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner

Constructor Detail

GetPaymentInfoCmdImpl

public GetPaymentInfoCmdImpl()
Method Detail

getOrderAccessBean

protected OrderAccessBean getOrderAccessBean()
Returns the OrderAccessBean representing the order whose payment information in the ORDPAYMTHD table is requested.
Returns:
the OrderAccessBean

getOrderId

protected java.lang.Long getOrderId()
Returns the ID of the order whose payment information in the ORDPAYMTHD table is requested.
Returns:
the order ID

getResources

public AccessVector getResources()
                          throws ECException
Returns the resources accessed by this command.

For this command, the resource accessed is the order.

Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Returns:
AccessVector - a vector of resource action pairs
Throws:
ECException

getUrl

protected java.lang.String getUrl()
Gets the URL property of the command.
Returns:
the URL to redirect to after the command completes its processing
See Also:
setUrl()

isReadyToCallExecute

public boolean isReadyToCallExecute()
This method is called by the Command Framework to check if all basic mandatory parameters have been set for this command. This is done before the Framework calls the performExecute method of the command.
Overrides:
isReadyToCallExecute in class AbstractECTargetableCommand
Returns:
true if we can execute the command; false otherwise.

performExecute

public void performExecute()
                    throws ECException
Performs the main business logic of the command.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException.
ECException

reset

public void reset()
Resets the instance variables of the command. The reset() method will reset all instance variables. If the command includes any output values that are accessible via getters, then make sure those values are no longer needed before calling this method to reset the instance variables of the command.

This is useful if the command instance is to be called multiple times with different command parameters.

Overrides:
reset in class AbstractECTargetableCommand

setOrderId

public void setOrderId(java.lang.Long orderId)
Sets the orderId property of the command.
Specified by:
setOrderId in interface GetPaymentInfoCmd
Parameters:
orderId - the order reference number of the Order for which the payment information is to be obtained.

setUrl

public void setUrl(java.lang.String astrUrl)
Sets the URL property of the command.
Specified by:
setUrl in interface GetPaymentInfoCmd
Parameters:
astrUrl - the URL to redirect to after the command completes its processing. The payment information is to be appended to this URL as additional name-value pairs in the query string.

validateParameters

public void validateParameters()
                        throws ECException
Checks the validity of supplied parameters.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException.
ECException

Feedback