com.ibm.commerce.payment.commands
Class ValidatePONumberCmdImpl

java.lang.Object
  |
  +--com.ibm.commerce.command.AbstractECCommand
        |
        +--com.ibm.commerce.command.TaskCommandImpl
              |
              +--com.ibm.commerce.payment.commands.ValidatePONumberCmdImpl
All Implemented Interfaces:
ECCommand, TaskCommand, ValidatePONumberCmd

public class ValidatePONumberCmdImpl
extends TaskCommandImpl
implements ValidatePONumberCmd

Default ValidatePONumber task command implementation.


Fields inherited from class com.ibm.commerce.command.AbstractECCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.payment.commands.ValidatePONumberCmd
COPYRIGHT, defaultCommandClassName, ERRTASK_NAME, NAME
 
Constructor Summary
ValidatePONumberCmdImpl()
           
 
Method Summary
 java.lang.Long getBuyerPOId()
          Returns Buyer Purchase Order reference number
 java.lang.Integer getBuyerPOType()
          Returns Buyer Purchase Order Type
protected  boolean getCreateFlag()
          Returns the createFlag property of the command.
protected  OrderAccessBean getOrder()
          Returns the OrderAccessBean representing the Order.
 void performExecute()
          Performs the main business logic of the command.
 void reset()
          This method is called after a command has been executed to reset its states variables.
 void setAccount(AccountAccessBean abAccount)
          Sets the abAccount property of the command.
 void setBuyerPONumber(java.lang.String sBPONum)
          Sets the sBPONum property of the command.
 void setCreateFlag(boolean createFlag)
          Sets the createFlag property of the command.
 void setErrorViewName(java.lang.String sEVN)
          Optional error view name passed in by the Caller.
 void setOrder(OrderAccessBean ab)
          Sets the order property of the command.
 
Methods inherited from class com.ibm.commerce.command.AbstractECCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, 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.command.ECCommand
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters
 

Constructor Detail

ValidatePONumberCmdImpl

public ValidatePONumberCmdImpl()
Method Detail

getBuyerPOId

public java.lang.Long getBuyerPOId()
Description copied from interface: ValidatePONumberCmd
Returns Buyer Purchase Order reference number
Specified by:
getBuyerPOId in interface ValidatePONumberCmd
Following copied from interface: com.ibm.commerce.payment.commands.ValidatePONumberCmd
Returns:
a Long containing reference number of the Buyer Purchase Order, return null if unknown

getBuyerPOType

public java.lang.Integer getBuyerPOType()
Description copied from interface: ValidatePONumberCmd
Returns Buyer Purchase Order Type
Specified by:
getBuyerPOType in interface ValidatePONumberCmd
Following copied from interface: com.ibm.commerce.payment.commands.ValidatePONumberCmd
Returns:
a Integer containing type of the Buyer Purchase Order, return null if unknown

getCreateFlag

protected boolean getCreateFlag()
Returns the createFlag property of the command.
See Also:
setCreateFlag

getOrder

protected OrderAccessBean getOrder()
Returns the OrderAccessBean representing the Order.

performExecute

public void performExecute()
                    throws ECException
Performs the main business logic of the command.
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.

reset

public void reset()
Description copied from class: AbstractECCommand
This method is called after a command has been executed to reset its states variables. After the call to reset, we should be able to execute the command again.
Overrides:
reset in class AbstractECCommand

setAccount

public void setAccount(AccountAccessBean abAccount)
Description copied from interface: ValidatePONumberCmd
Sets the abAccount property of the command.
Specified by:
setAccount in interface ValidatePONumberCmd
Following copied from interface: com.ibm.commerce.payment.commands.ValidatePONumberCmd
Parameters:
abAccount - the AccountAccessBean of the Order is associated with

setBuyerPONumber

public void setBuyerPONumber(java.lang.String sBPONum)
Description copied from interface: ValidatePONumberCmd
Sets the sBPONum property of the command.
Specified by:
setBuyerPONumber in interface ValidatePONumberCmd
Following copied from interface: com.ibm.commerce.payment.commands.ValidatePONumberCmd
Parameters:
sBPONum - the actual Buyer Purchase Order Number input from controller command.

setCreateFlag

public void setCreateFlag(boolean createFlag)
Sets the createFlag property of the command. By default, the flag is set to true and the command will create new BuyerPurchaseOrder object for a new Individual PO after verifying that an Individual PO is allowed. Set the flag to false if you do not want the command to create any BuyerPurchaseOrder object as a by-product of the Validation.
Specified by:
setCreateFlag in interface ValidatePONumberCmd

setErrorViewName

public void setErrorViewName(java.lang.String sEVN)
Optional error view name passed in by the Caller.
Specified by:
setErrorViewName in interface ValidatePONumberCmd

setOrder

public void setOrder(OrderAccessBean ab)
Description copied from interface: ValidatePONumberCmd
Sets the order property of the command.
Specified by:
setOrder in interface ValidatePONumberCmd
Following copied from interface: com.ibm.commerce.payment.commands.ValidatePONumberCmd
Parameters:
abOrder - the OrderAccessBean of the Order.