|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectJavaBeans.Customer_Interface
| Field Summary | |
private Address_Data |
address
|
private CreditCard_Data |
card
|
private Coffee_Data |
coffee
|
private CoffeeManager |
coffeemanager
|
private Customer_Data |
customer
|
private CustomerManager |
customermanager
|
(package private) java.lang.String |
message
Class variables |
private CoffeePreference_Data |
preference
|
private ServletConnection |
servletconn
|
(package private) boolean |
successful
|
private Coffee_Data[] |
totalcoffees
|
private XmlGenerator |
xmlgenerator
|
private XmlUnmarshal |
xmlunmarshal
|
| Constructor Summary | |
Customer_Interface()
|
|
| Method Summary | |
void |
addCustomer()
This method is being used for validating and adding new customer to TMS as well as the application database. |
void |
clearMessage()
This method is being used for clearing up all the concatenated messages. |
private void |
debugDataClasses()
This method is being used for debugging purposes. |
void |
doLogin()
This method is being used for authentication of a customer using the LDAP server and retrieving all the customer information if the authentication is successful. |
Address_Data |
getAddress()
This method is being used for getting the address data. |
Coffee_Data |
getCoffee()
This method is being used for getting the coffee data. |
private Coffee_Data |
getCoffeeByDescription(java.lang.String desc)
This utility method is being used for getting the Coffee_Data given a coffee description. |
private Coffee_Data |
getCoffeeByItemCode(java.lang.String itemCode)
This utility method is being used for getting the Coffee_Data given an itemcode. |
CreditCard_Data |
getCreditCard()
Method: getCreditCard This method is being used for getting the credit card data. |
Customer_Data |
getCustomer()
This method is being used for getting the customer. |
java.lang.String |
getMessage()
This method is being used for getting the message to be displayed on the java server pages. |
CoffeePreference_Data |
getPreference()
This method is being used for getting the coffee preference data. |
boolean |
getSuccessful()
This method is being used for getting and checking the success - if the validation was successful or not. |
void |
orderCoffee()
This method is being used for ordering a coffee. |
void |
processRequest(java.lang.String action,
Customer_Data customer,
CreditCard_Data creditCard,
Address_Data address,
CoffeePreference_Data coffee)
This method is being used for directing all incoming requests to appropriate methods. |
double |
round(double x,
int dec)
This utility method is being used for rounding a double to the given number of decimal places. |
void |
setMessage(java.lang.String s)
This method is being used for setting messages that are displayed on the java server pages |
void |
setSuccessful(boolean b)
This method is being used for setting the success boolean - defining whether the validation was successful. |
void |
updateAccount()
This method is being used for updating only the user account, unlike updateCustomer method, this method does not update other details of the customer. |
void |
updateCustomer()
This method is being used for update a customer's details. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private Address_Data address
private CreditCard_Data card
private Coffee_Data coffee
private CoffeeManager coffeemanager
private Customer_Data customer
private CustomerManager customermanager
java.lang.String message
private CoffeePreference_Data preference
private ServletConnection servletconn
boolean successful
private Coffee_Data[] totalcoffees
private XmlGenerator xmlgenerator
private XmlUnmarshal xmlunmarshal
| Constructor Detail |
public Customer_Interface()
| Method Detail |
public void addCustomer()
public void clearMessage()
private void debugDataClasses()
public void doLogin()
public Address_Data getAddress()
public Coffee_Data getCoffee()
private Coffee_Data getCoffeeByDescription(java.lang.String desc)
desc - Coffee description.
private Coffee_Data getCoffeeByItemCode(java.lang.String itemCode)
itemCode - Coffee item code.
public CreditCard_Data getCreditCard()
public Customer_Data getCustomer()
public java.lang.String getMessage()
public CoffeePreference_Data getPreference()
public boolean getSuccessful()
public void orderCoffee()
public void processRequest(java.lang.String action,
Customer_Data customer,
CreditCard_Data creditCard,
Address_Data address,
CoffeePreference_Data coffee)
action - The action to be taken - identifies which method can be
used to process the request.customer - Customer details sent from the jsp.creditCard - Credit card details sent from the jsp.address - Address details sent from the jsp.coffee - Coffee details sent from the jsp.
public double round(double x,
int dec)
x - The original double that is to be rounded.dec - The number of decimal places the double has to be rounded to.
public void setMessage(java.lang.String s)
s - The message to be displayed.
public void setSuccessful(boolean b)
b - Defines whether validation was successful.
public void updateAccount()
public void updateCustomer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||