net.sourceforge.saxadapter.examples.commerce
Class OrderProcessor

java.lang.Object
  |
  +--net.sourceforge.saxadapter.examples.commerce.OrderProcessor

public class OrderProcessor
extends java.lang.Object

This class processes e-commerce orders in the XCBL 3.5 format and converts them into Order objects

Author:
Mark Priest

Field Summary
(package private)  OrderAddressHandler m_orderAddressHandler
           
(package private)  OrderContactHandler m_orderContactHandler
           
(package private)  OrderContactNumHandler m_orderContactNumHandler
           
(package private)  OrderHandler m_orderHandler
           
(package private)  OrderLineItemHandler m_orderLineItemHandler
           
(package private)  OrderPartNumHandler m_orderPartNumHandler
           
(package private)  OrderPartyHandler m_orderPartyHandler
           
(package private)  OrderReferenceHandler m_orderReferenceHandler
           
(package private)  SAXAdapter m_parserAdapter
           
(package private)  SAXAdapter m_writerAdapter
           
(package private)  XCBLResponseWriter m_writerHandler
           
static java.lang.String ORDER_DATE_FORMAT
           
static java.lang.String XCBL35NAMESPACE
           
 
Constructor Summary
OrderProcessor()
           
 
Method Summary
static void main(java.lang.String[] args)
          This main method takes an argument of the path of an XML file in the JVM classpath which represent an XCBL 3.5 OrderRequest and writes out the OrderResponse.
 Order processXCBL35Order(org.xml.sax.InputSource argIn)
          This method takes an InputSource that represents an order in XCBL 3.5 format and converts it to an Order object
 Order processXCBL35Order(org.xml.sax.InputSource argIn, java.io.Writer argWriter)
          This method takes an InputSource that represents an order in XCBL 3.5 format and converts it to an Order object and also creates an XCBL 3.5 OrderResponse document to be returned to the buyer
static void usage(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XCBL35NAMESPACE

public static final java.lang.String XCBL35NAMESPACE

ORDER_DATE_FORMAT

public static final java.lang.String ORDER_DATE_FORMAT

m_parserAdapter

SAXAdapter m_parserAdapter

m_writerAdapter

SAXAdapter m_writerAdapter

m_writerHandler

XCBLResponseWriter m_writerHandler

m_orderHandler

OrderHandler m_orderHandler

m_orderAddressHandler

OrderAddressHandler m_orderAddressHandler

m_orderContactHandler

OrderContactHandler m_orderContactHandler

m_orderContactNumHandler

OrderContactNumHandler m_orderContactNumHandler

m_orderPartyHandler

OrderPartyHandler m_orderPartyHandler

m_orderReferenceHandler

OrderReferenceHandler m_orderReferenceHandler

m_orderLineItemHandler

OrderLineItemHandler m_orderLineItemHandler

m_orderPartNumHandler

OrderPartNumHandler m_orderPartNumHandler
Constructor Detail

OrderProcessor

public OrderProcessor()
               throws org.xml.sax.SAXException
Method Detail

processXCBL35Order

public Order processXCBL35Order(org.xml.sax.InputSource argIn)
                         throws org.xml.sax.SAXException,
                                java.io.IOException
This method takes an InputSource that represents an order in XCBL 3.5 format and converts it to an Order object
Parameters:
argIn - the order in XCBL 3.5 format
Throws:
SAXException, - IOException

processXCBL35Order

public Order processXCBL35Order(org.xml.sax.InputSource argIn,
                                java.io.Writer argWriter)
                         throws org.xml.sax.SAXException,
                                java.io.IOException
This method takes an InputSource that represents an order in XCBL 3.5 format and converts it to an Order object and also creates an XCBL 3.5 OrderResponse document to be returned to the buyer
Parameters:
argIn - the order in XCBL 3.5 format
argWriter - the writer to which to write the OrderResponse document
Throws:
SAXException, - IOException

main

public static void main(java.lang.String[] args)
This main method takes an argument of the path of an XML file in the JVM classpath which represent an XCBL 3.5 OrderRequest and writes out the OrderResponse. If the optional second argument is provided it is interpreted as a file name to which the output is written.
Parameters:
args - the first argument is the path of an XML file within the JVM classpath following the DTD. The second argument is the optional filename for the output

usage

public static void usage(java.lang.String[] args)