Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## XmlCommunication
Class XmlGenerator

    java.lang.Object
      XmlCommunication.XmlGenerator

public class XmlGenerator
extends java.lang.Object

Author:
  student This class is being used for compiling xml packets using the classes generated by Castor.

Field Summary
`private static int` | `counter`

Constructor Summary
`XmlGenerator()` This is the constructor for XmlGenerator.java

Method Summary
`java.lang.String` | `adminAddXml(Customer_Data customer, Address_Data address)` This method is being used for the compilation of an admin add xml packet, which adds a new ncb to the TMS.
`java.lang.String` | `adminUpdateXml(Customer_Data customer, Address_Data address)` This method is being used for the compilation of admin update xml oacket which is used to update a given ncb.
`java.lang.String` | `enquiryNcbAddressXml(Customer_Data customer, CreditCard_Data card)` This method is being used for the compilation of enquiry ncb address xml which is used to get the address data of the specified ncb from TMS.
`java.lang.String` | `enquiryNcbXml(Customer_Data customer, CreditCard_Data card)` This method is being used for the compilation of enquiry ncb xml packet which gets the given ncb's data from TMS.
`java.lang.String` | `transactionAuthXml(Customer_Data customer, CreditCard_Data card)` This method is being used for compilation of transactionAuth Xml packet which is used to authenticate a customer's credit account and sets up an account with TMS.
`java.lang.String` | `transactionPurchaseXml(Customer_Data customer, Address_Data address, CoffeePreference_Data preference, Coffee_Data coffee)` This method is being used for the compilation of transaction purchase xml packet which is used to identify a purchase order.
`java.lang.String` | `transactionSettlementXml(Customer_Data customer, CreditCard_Data card, CoffeePreference_Data preference, Coffee_Data coffee)` This method is being used for the compilation of transaction settlement xml packet which asks for the confirmation of the transaction.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### counter

    private static int counter

Constructor Detail

### XmlGenerator

    public XmlGenerator()

  This is the constructor for XmlGenerator.java

Method Detail

### adminAddXml

    public java.lang.String adminAddXml(Customer_Data customer,
                                        Address_Data address)

  This method is being used for the compilation of an admin add xml packet, which adds a new ncb to the TMS.

  Parameters:
    `customer` - Customer details that are to be added to TMS.
    `address` - Address details that are to be added to TMS.
  Returns:
    String The xml message representing admin add.

### adminUpdateXml

    public java.lang.String adminUpdateXml(Customer_Data customer,
                                           Address_Data address)

  This method is being used for the compilation of admin update xml oacket which is used to update a given ncb.

  Parameters:
    `customer` - The customer details that are to be updated in TMS.
    `address` - The address details that are being updated in TMS.
  Returns:
    String The xml string representing the admin update xml message.

### enquiryNcbAddressXml

    public java.lang.String enquiryNcbAddressXml(Customer_Data customer,
                                                 CreditCard_Data card)

  This method is being used for the compilation of enquiry ncb address xml which is used to get the address data of the specified ncb from TMS.

  Parameters:
    `customer` - Customer details that are being used for enquiry ncb address.
    `card` - The credit card details that are being used for enquiry ncb address.
  Returns:
    String The xml string that represents enquiry ncb address.

### enquiryNcbXml

    public java.lang.String enquiryNcbXml(Customer_Data customer,
                                          CreditCard_Data card)

  This method is being used for the compilation of enquiry ncb xml packet which gets the given ncb's data from TMS.

  Parameters:
    `customer` - Customer details for whom enquiry ncb is being sent.
    `card` - Credit card details that are used for the enquiry ncb.
  Returns:
    String The xml string that represents theenquiry ncb.

### transactionAuthXml

    public java.lang.String transactionAuthXml(Customer_Data customer,
                                               CreditCard_Data card)

  This method is being used for compilation of transactionAuth Xml packet which is used to authenticate a customer's credit account and sets up an account with TMS.

  Parameters:
    `customer` - Customer details that are used for authorising the transaction.
    `card` - Credit card details that are used for authorisation of the transaction.
  Returns:
    String The xml string representing the transaction auth.

### transactionPurchaseXml

    public java.lang.String transactionPurchaseXml(Customer_Data customer,
                                                   Address_Data address,
                                                   CoffeePreference_Data preference,
                                                   Coffee_Data coffee)

  This method is being used for the compilation of transaction purchase xml packet which is used to identify a purchase order.

  Parameters:
    `customer` - Customer details that are used for transaction purchase.
    `address` - Address details that are used for transaction purchase.
    `preference` - Coffee preference details that are used for the transaction purchase.
    `coffee` - Coffee details that used for the transaction purchase.
  Returns:
    String The xml string that represents the trnsaction purchase.

### transactionSettlementXml

    public java.lang.String transactionSettlementXml(Customer_Data customer,
                                                     CreditCard_Data card,
                                                     CoffeePreference_Data preference,
                                                     Coffee_Data coffee)

  This method is being used for the compilation of transaction settlement xml packet which asks for the confirmation of the transaction.

  Parameters:
    `customer` - Customer details that are being used for the transaction settlement.
    `card` - Credit card details that are being used for the transaction settlement.
    `preference` - Coffee preference details that are being used for the transaction settlement.
    `coffee` - Coffee details that are being used for the transaction settlement.
  Returns:
    String The xml string representing the transaction settlement.

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD