com.ibm.commerce.payment.commands
Interface ValidatePONumberCmd
- All Superinterfaces:
- TaskCommand
- All Known Implementing Classes:
- ValidatePONumberCmdImpl
- public interface ValidatePONumberCmd
- extends TaskCommand
Perform the checks on the specified buyerPONumber.
Parameter:
Parameter Name |
Type |
Descriptions |
order |
OrderAccessBean |
The OrderAccessBean |
account |
AccountAccessBean |
The AccountAccessBean representing the common account object of all the Trading Agreements specified by the OrderItems of the Order. |
buyerPONumber |
String |
The Buyer Purchase Order Number |
errorViewName |
String |
Optional error view name passed in by the Caller. |
createFlag |
boolean |
Flag to indicate if the command may create BuyerPurchaseOrder object as a by-product of the validation. By default, this flag is set to true. |
Behavior:
- Checks the buyerPONumber against predefined POs (Limited or Blanket PO) in the Trading Agreement (of the Account). If the buyerPONumber is one of the predefined PO but the PO is no longer active, then throws an ECApplicationException.
- If the buyerPONumber is not a predefined PO and individualPO is not specified for the Trading Agreement, then the buyerPONumber is invalid. Throws an ECApplicationException.
- If the buyerPONumber is not a predefined PO and individualPO is specified for the Trading Agreement (of the Account) then make sure this "individual" PONumber has not been used for this Account if uniqueness is in the PurchaseOrderTC (POTCIndividual). Otherwise, throws an ECApplicationException.
Returned Parameters:
- buyerPOType (Same value as the buyerPOTyp_id) to indicate the Type of buyerPO,
- buyerPOId (ID of the BuyerPurchaseOrder object if one exists or is created. Otherwise, null).
Default Error View Name:
- ValidatePONumberErrorView (This is the default ErrorViewName if none is passed into the command.)
ErrorCodes:
Field Summary |
static java.lang.String |
COPYRIGHT
IBM copyright notice field. |
static java.lang.String |
defaultCommandClassName
The default implementation of this command. |
static java.lang.String |
ERRTASK_NAME
Name of the default error view for this command. |
static java.lang.String |
NAME
The name of this command. |
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. |
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 abOrder)
Sets the order property of the command. |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- IBM copyright notice field.
- See Also:
- Constant Field Values
NAME
public static final java.lang.String NAME
- The name of this command.
- See Also:
- Constant Field Values
defaultCommandClassName
public static final java.lang.String defaultCommandClassName
- The default implementation of this command.
- See Also:
- Constant Field Values
ERRTASK_NAME
public static final java.lang.String ERRTASK_NAME
- Name of the default error view for this command. The constant value of this field is "ValidatePONumberErrorView".
- See Also:
- Constant Field Values
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.
-
- 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:
-
- Returns:
- the buyer purchase order type; null if not known
setAccount
public void setAccount(AccountAccessBean abAccount)
- Sets the Account property of the command.
-
- 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.
-
- 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 BuyerPO record for a new Individual Purchase Order after verifying that an Individual Purchase Order is allowed. Set the flag to false if you do not want the command to create any BuyerPO record as a by-product of the validation.
-
- 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.
-
- Parameters:
- sEVN - the Error View name
setOrder
public void setOrder(OrderAccessBean abOrder)
- Sets the order property of the command.
-
- Parameters:
- abOrder - the OrderAccessBean of the order to be processed
Feedback
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.