public class RequisitionListBaseCmdImpl extends ControllerCommandImpl
When the command is called from the URL, the web controller will call the following methods in sequence:
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
The IBM copyright notice field.
|
protected java.lang.Long | iOrderId
The id of the order.
|
protected java.lang.Long | iRequisitionListId
The id of the requisition list.
|
protected java.lang.String | iRequisitionListName
The name of the requisition list.
|
protected java.lang.String | iRequisitionListStatus
The status of the requisition list.
|
protected java.lang.String | iRequisitionListType
The type of the requisition list.
|
Constructor and Description |
---|
RequisitionListBaseCmdImpl() |
Modifier and Type | Method and Description |
---|---|
protected void | checkThreshold(com.ibm.commerce.order.utils.ThresholdCheckContext context)
Performs a check to see if the threshold has been exceeded in the given context.
|
protected java.lang.Long | copyOrder(java.lang.Long fromOrderId)
This method copies an order (id = fromOrderId) and return the order id of the new created order.
|
protected OrderAccessBean | copyOrder(OrderAccessBean fromOrderAB)
This method copies the OrderAccessBean fromOrderAB and return a new created OrderAccessBean which is a clone of fromOrderAB.
|
protected OrderAccessBean | copyOrderAccessBean(OrderAccessBean fromOrderAB)
This method copies the OrderAccessBean fromOrderAB and return a new created OrderAccessBean which is a clone of fromOrderAB.
|
protected OrderItemAccessBean | copyOrderItemAccessBean(OrderItemAccessBean fromOrderItemAB, java.lang.Long toOrderId)
This method copies the OrderItemAccessBean fromOrderItemAB and return a new created OrderItemAccessBean which is a clone of fromOrderItemAB and with order id = toOrderId.
|
protected void | copyOrderPayInfo(java.lang.Long fromOrderId, java.lang.Long toOrderId)
This method copies the order pay info from the order (id = fromOrderId) to the order (id = toOrderId).
|
void | deleteRequisitionListHelper(OrderAccessBean orderAB)
This method deletes the requisition list for specified order access bean.
|
protected com.ibm.commerce.order.utils.AdminConfigLoader<com.ibm.commerce.order.utils.OrderThreshold.Part> | getAdminConfigLoader()
Returns the object that is used to get thresholds.
|
protected java.lang.String | getName()
This method returns the name of the requisition list.
|
protected java.lang.Long | getOrderId()
This method returns the id of the order.
|
protected java.lang.Long | getRequisitionListId()
This method returns the id of the requisition list.
|
java.lang.String | getStatus()
This method returns the status of the requisition list.
|
java.lang.String | getType()
This method returns the type of requisition list.
|
protected boolean | isThresholdAcceptable(com.ibm.commerce.order.utils.ThresholdCheckContext context)
Returns whether the threshold in the given context has been exceeded.
|
void | reset()
This method resets all instance variables.
|
protected void | setDefaultRequisitionListStatus()
This method sets the default requisition list status - 'Y'.
|
protected void | setDefaultRequisitionListStatusAndType()
This method sets the default requisition list status - 'Y'.
|
protected void | setDefaultRequisitionListType()
This method sets the default requisition list type - 'Y'.
|
protected void | setName(java.lang.String name)
This method sets the name of the requisition list.
|
protected void | setOrderId(java.lang.Long id)
This method sets the id of the order.
|
void | setRequestProperties(TypedProperty reqProperties)
This method sets the request properties.
|
protected void | setRequisitionListId(java.lang.Long id)
This method sets the id of the requisition list.
|
static void | setRequisitionListStatus(java.lang.String status, OrderAccessBean orderAB, CommandContext commandContext)
This method sets the status of the requisition list.
|
static void | setRequisitionListType(java.lang.String type, OrderAccessBean orderAB, CommandContext commandContext)
This method sets the type of the requisition list.
|
protected void | setStatus(java.lang.String status)
This method sets the status of the requisition list.
|
protected void | setType(java.lang.String paraiRequisitionListType)
This method sets the type of requisition list.
|
protected void | thresholdExceeded(com.ibm.commerce.order.utils.ThresholdCheckContext context)
Takes some action to react to a threshold that has been exceeded.
|
protected void | updateOrderStatusForCopy(OrderAccessBean toOrderAB)
This method updates order status for copy.
|
protected void | updateResponseView()
This method sets the default response view - Redirect View.
|
public static final java.lang.String COPYRIGHT
protected java.lang.Long iOrderId
protected java.lang.Long iRequisitionListId
protected java.lang.String iRequisitionListType
protected java.lang.String iRequisitionListStatus
protected java.lang.String iRequisitionListName
protected OrderAccessBean copyOrder(OrderAccessBean fromOrderAB) throws java.sql.SQLException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException, java.rmi.RemoteException, ECException
protected java.lang.Long copyOrder(java.lang.Long fromOrderId) throws java.sql.SQLException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException, java.rmi.RemoteException, ECException
protected OrderAccessBean copyOrderAccessBean(OrderAccessBean fromOrderAB) throws java.sql.SQLException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException, java.rmi.RemoteException, ECException
protected void updateOrderStatusForCopy(OrderAccessBean toOrderAB) throws java.sql.SQLException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException, java.rmi.RemoteException, ECException
protected OrderItemAccessBean copyOrderItemAccessBean(OrderItemAccessBean fromOrderItemAB, java.lang.Long toOrderId) throws java.sql.SQLException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException, java.rmi.RemoteException, ECException
protected void copyOrderPayInfo(java.lang.Long fromOrderId, java.lang.Long toOrderId) throws java.sql.SQLException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException, java.rmi.RemoteException, ECException
protected java.lang.String getName()
protected java.lang.Long getOrderId()
protected java.lang.Long getRequisitionListId()
public java.lang.String getStatus()
public void reset()
protected void setDefaultRequisitionListStatus()
protected void setDefaultRequisitionListType()
protected void setDefaultRequisitionListStatusAndType()
protected void setName(java.lang.String name)
protected void setOrderId(java.lang.Long id)
public void setRequestProperties(TypedProperty reqProperties) throws ECException
protected void setRequisitionListId(java.lang.Long id)
protected void setStatus(java.lang.String status)
protected void updateResponseView()
public java.lang.String getType()
protected void setType(java.lang.String paraiRequisitionListType)
public static void setRequisitionListStatus(java.lang.String status, OrderAccessBean orderAB, CommandContext commandContext) throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException, java.rmi.RemoteException, ECException
public static void setRequisitionListType(java.lang.String type, OrderAccessBean orderAB, CommandContext commandContext) throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException, java.rmi.RemoteException, ECException
public void deleteRequisitionListHelper(OrderAccessBean orderAB) throws java.sql.SQLException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException, java.rmi.RemoteException, ECException
protected com.ibm.commerce.order.utils.AdminConfigLoader<com.ibm.commerce.order.utils.OrderThreshold.Part> getAdminConfigLoader()
protected final void checkThreshold(com.ibm.commerce.order.utils.ThresholdCheckContext context) throws ECException
The different situations that result in a call to this method is described by the constants in OrderThreshold. See ThresholdCheckContext for instructions on how to create a ThresholdCheckContext.
This method cannot be overridden, in order to ensure that the basic flow of "check" followed by "action" is performed. However, the "check" and "action" steps can both be customized by overriding the corresponding methods. Customization can be implemented by overriding these two methods: isThresholdAcceptable(ThresholdCheckContext) or thresholdExceeded(ThresholdCheckContext).
protected boolean isThresholdAcceptable(com.ibm.commerce.order.utils.ThresholdCheckContext context)
The default behavior depends on the type of threshold. For a quantity, the value will be directly compared with the threshold. For a non-quantity threshold, the value will be added to the current amount and compared with the threshold.
protected void thresholdExceeded(com.ibm.commerce.order.utils.ThresholdCheckContext context) throws ECException
The default behavior is to throw an exception with an error message that explains the problem to the user (by calling ThresholdCheckContext.throwDefaultException()). A message is also written to the log file for the administrator (by calling ThresholdCheckContext.log(Logger, String)).