com.retek.rcom.gui.wrapper
Class RcomOrderManager

java.lang.Object
  extended bycom.retek.rcom.gui.wrapper.RcomOrderManager

public class RcomOrderManager
extends java.lang.Object

This class manages generic order functionality for the UI layer.

Retek Inc. Copyright (c) 2002


Constructor Summary
RcomOrderManager()
           
 
Method Summary
static void addPaymentToOrder(CustomerOrder order, CustomerOrderPayment payment, OrderScreenType screenType)
          Adds a payment to the customer order and authorize it if necessary.
static void clearMailOrder()
          Clears the mail order from the repository.
static void clearOrder(CustomerOrder customerOrder)
          Clears out the inventory on an order that is cleared and non submitted.
static void clearOrders(boolean orderEntry, boolean orderMain, boolean clearCustomer)
          Clears the RcomRepository of orders and discards the changes on customer.
static void createOrders(boolean newCustomer)
          Creates the customer and orders and puts them in the RcomRepository.
static void createOrders(Customer customer, Banner banner)
           
static java.util.List getDisplayableOrderLines(CustomerOrder order)
          Retrieves all the displayable order lines of a customer order automatically excluding No-Longer-Available items.
static RcomOrderLine getFirstOrderLine(CustomerOrder order)
          Retrieves the very first RcomOrderLine within a customer order.
static RcomOrderLine getLastOrderLine(CustomerOrder order)
          Retrieves the very last RcomOrderLine within a customer order.
static java.util.List getNonPersistedOrderLines(CustomerOrder order)
          Retrieves all the non persisted order lines in the order.
static java.util.List getReplaceableOrderLines(CustomerOrder order)
          Retrieves all the replaceable order lines of a customer order.
static java.util.List getReturnableOrderLines(CustomerOrder order)
          Retrieves all the returnable order lines of a customer order.
static boolean hasOrderLines(CustomerOrder order)
          Returns whethor or not an order contains order lines.
static boolean hasReplaceableOrderLines(CustomerOrder order)
          Returns whethor or not an order contains replaceable order lines.
static boolean hasReturnableOrderLines(CustomerOrder order)
          Returns whethor or not an order contains returnable order lines.
static boolean isOrderAutoCancellable(CustomerOrder customerOrder)
          Retrieves whether or not an order can be automatically cancelled by the system.
static void storeMailOrder(CustomerOrder customerOrder)
          Stores a mail order in the repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RcomOrderManager

public RcomOrderManager()
Method Detail

clearOrder

public static void clearOrder(CustomerOrder customerOrder)
                       throws SystemException,
                              BusinessException
Clears out the inventory on an order that is cleared and non submitted. In order maintenance, the CSR should not be allowed to increase the order amount and decreases should not release inventory until submit is pressed.

Throws:
SystemException
BusinessException

clearOrders

public static void clearOrders(boolean orderEntry,
                               boolean orderMain,
                               boolean clearCustomer)
                        throws SystemException,
                               BusinessException
Clears the RcomRepository of orders and discards the changes on customer.

Throws:
SystemException
BusinessException

createOrders

public static void createOrders(boolean newCustomer)
                         throws SystemException
Creates the customer and orders and puts them in the RcomRepository. The Customer Order Totals must come before the orders in sequence.

Throws:
SystemException

createOrders

public static void createOrders(Customer customer,
                                Banner banner)
                         throws SystemException,
                                BusinessException
Throws:
SystemException
BusinessException

getDisplayableOrderLines

public static java.util.List getDisplayableOrderLines(CustomerOrder order)
                                               throws SystemException,
                                                      BusinessException
Retrieves all the displayable order lines of a customer order automatically excluding No-Longer-Available items. It turns out that NLA is ALWAYS excluded as far as the UI is concerned. The method isDisplayable() on orderLine automatically handles this.

Throws:
SystemException
BusinessException

getNonPersistedOrderLines

public static java.util.List getNonPersistedOrderLines(CustomerOrder order)
                                                throws SystemException,
                                                       BusinessException
Retrieves all the non persisted order lines in the order.

Throws:
SystemException
BusinessException

getReturnableOrderLines

public static java.util.List getReturnableOrderLines(CustomerOrder order)
                                              throws SystemException,
                                                     BusinessException
Retrieves all the returnable order lines of a customer order.

Component lines are not returnable as far as the GUI is concerned. The second loop looks for returnable component lines and adds the PACK order line to the list.

Throws:
SystemException
BusinessException

getReplaceableOrderLines

public static java.util.List getReplaceableOrderLines(CustomerOrder order)
                                               throws SystemException,
                                                      BusinessException
Retrieves all the replaceable order lines of a customer order. Gift Certificates are not replaceable.

Throws:
SystemException
BusinessException

getLastOrderLine

public static RcomOrderLine getLastOrderLine(CustomerOrder order)
                                      throws SystemException,
                                             BusinessException
Retrieves the very last RcomOrderLine within a customer order.

Throws:
SystemException
BusinessException

getFirstOrderLine

public static RcomOrderLine getFirstOrderLine(CustomerOrder order)
                                       throws SystemException,
                                              BusinessException
Retrieves the very first RcomOrderLine within a customer order.

Throws:
SystemException
BusinessException

hasOrderLines

public static boolean hasOrderLines(CustomerOrder order)
                             throws SystemException,
                                    BusinessException
Returns whethor or not an order contains order lines.

Throws:
SystemException
BusinessException

hasReturnableOrderLines

public static boolean hasReturnableOrderLines(CustomerOrder order)
                                       throws SystemException,
                                              BusinessException
Returns whethor or not an order contains returnable order lines.

Throws:
SystemException
BusinessException

hasReplaceableOrderLines

public static boolean hasReplaceableOrderLines(CustomerOrder order)
                                        throws SystemException,
                                               BusinessException
Returns whethor or not an order contains replaceable order lines.

Throws:
SystemException
BusinessException

addPaymentToOrder

public static void addPaymentToOrder(CustomerOrder order,
                                     CustomerOrderPayment payment,
                                     OrderScreenType screenType)
                              throws SystemException,
                                     BusinessException
Adds a payment to the customer order and authorize it if necessary. Also, if the order balance negative after adding the payment, generate the auto-refunds for the order. THIS IS BUSINESS LOGIC !!!!! WHY IS IT NOT IN CUSTOMER ORDER???!!!!!!!!!!!!!!!!

Throws:
SystemException
BusinessException

isOrderAutoCancellable

public static boolean isOrderAutoCancellable(CustomerOrder customerOrder)
                                      throws SystemException
Retrieves whether or not an order can be automatically cancelled by the system.

Throws:
SystemException

clearMailOrder

public static void clearMailOrder()
                           throws SystemException
Clears the mail order from the repository.

Throws:
SystemException

storeMailOrder

public static void storeMailOrder(CustomerOrder customerOrder)
                           throws SystemException,
                                  BusinessException
Stores a mail order in the repository.

Throws:
SystemException
BusinessException


Copyright © 2004 Retek Inc. All Rights Reserved. - Generated at Fri, 10/22/2004 07:28