com.ibm.commerce.payment.commands
Class ValidatePONumberCmdImpl

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

public class ValidatePONumberCmdImpl
extends TaskCommandImpl
implements ValidatePONumberCmd

Default ValidatePONumber task command implementation.

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. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.payment.commands. ValidatePONumberCmd
COPYRIGHT, defaultCommandClassName, ERRTASK_NAME, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand
COPYRIGHT
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
ValidatePONumberCmdImpl()
           
 
Method Summary
 java.lang.Long getBuyerPOId()
          Returns the internal ID of the BuyerPO record if the specified buyer purchase order number is valid.
 java.lang.Integer getBuyerPOType()
          Returns the Buyer Purchase Order type referenced by the specified Buyer Purchase Order number.
protected  boolean getCreateFlag()
          Returns the createFlag property of the command.
protected  OrderAccessBean getOrder()
          Gets the OrderAccessBean representing the order.
 void performExecute()
          Performs the main business logic of the command.
 void reset()
          Resets the instance variables of the command.
 void setAccount( AccountAccessBean abAccount)
          Sets the Account property of the command.
 void setBuyerPONumber(java.lang.String sBPONum)
          Sets the buyerPONumber property of the command.
 void setCreateFlag(boolean createFlag)
          Sets the createFlag property of the command.
 void setErrorViewName(java.lang.String sEVN)
          Sets the error view to be used to report error.
 void setOrder( OrderAccessBean ab)
          Sets the order property of the command.
 
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, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidatePONumberCmdImpl

public ValidatePONumberCmdImpl()
Method Detail

getBuyerPOId

public java.lang.Long getBuyerPOId()
Returns the internal ID of the BuyerPO record if the specified buyer purchase order number is valid. Otherwise returns a null.
Specified by:
getBuyerPOId in interface ValidatePONumberCmd
Returns:
the internal ID of the BuyerPO record or null

getBuyerPOType

public java.lang.Integer getBuyerPOType()
Returns the Buyer Purchase Order type referenced by the specified Buyer Purchase Order number.

The following buyer purchase order types are defined:

Specified by:
getBuyerPOType in interface ValidatePONumberCmd
Returns:
the buyer purchase order type; null if not known

getCreateFlag

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

getOrder

protected OrderAccessBean getOrder()
Gets the OrderAccessBean representing the order.
Returns:
the OrderAccessBean

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

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

setAccount

public void setAccount(AccountAccessBean abAccount)
Sets the Account property of the command.
Specified by:
setAccount in interface ValidatePONumberCmd
Parameters:
abAccount - the AccountAccessBean of the order is associated with

setBuyerPONumber

public void setBuyerPONumber(java.lang.String sBPONum)
Sets the buyerPONumber property of the command.
Specified by:
setBuyerPONumber in interface ValidatePONumberCmd
Parameters:
sBPONum - the actual buyer purchase order number specified by the customer for the purchase

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
Parameters:
createFlag - true to allow the command to create a new BuyerPO record if needed

setErrorViewName

public void setErrorViewName(java.lang.String sEVN)
Sets the error view to be used to report error. This overrides the default error view of the command.
Specified by:
setErrorViewName in interface ValidatePONumberCmd
Parameters:
sEVN - the Error View name
See Also:
ValidatePONumberCmd.ERRTASK_NAME

setOrder

public void setOrder(OrderAccessBean ab)
Sets the order property of the command.
Specified by:
setOrder in interface ValidatePONumberCmd
Parameters:
ab - the OrderAccessBean of the order to be processed