|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.ix.jspTutorial.controller.ModelManager
This class provides a convienient set of methods for the
web tier components to access all the model objects.
This class also insures that only one copy of the model objects
are created for web tier access by placing a reference to the
model objects in the session.
Field Summary | |
private javax.servlet.http.HttpSession |
httpSession
Session des ModelManagers |
private javax.servlet.ServletContext |
myApplication
Application |
static java.lang.String |
vcid
Version des Source |
Fields inherited from interface de.ix.jspTutorial.constants.SessionConstants |
CUSTOMER,
MODEL_MANAGER,
PERSONAL_PIZZA,
PIZZA_ACCESSOR |
Constructor Summary | |
ModelManager()
|
Method Summary | |
Customer |
getCustomer()
Get the current customer object. |
PersonalPizza |
getPersonalPizza()
Get the current personal pizza object. |
PizzaAccessor |
getPizzaAccessor()
Get pizza accessor object. |
void |
init(javax.servlet.ServletContext servletContext,
javax.servlet.http.HttpSession httpSession)
Initialize method for the ModelManager instance |
boolean |
isCustomerLoggedIn()
Check if there is a valid customer object. |
void |
resetCustomer()
Reset the current customer object. |
void |
setCustomer(Customer newCustomer)
Set the current customer object. |
void |
setPersonalPizza(PersonalPizza newPersonalPizza)
Set the current personal pizza object. |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static java.lang.String vcid
private javax.servlet.ServletContext myApplication
private javax.servlet.http.HttpSession httpSession
Constructor Detail |
public ModelManager()
Method Detail |
public void init(javax.servlet.ServletContext servletContext, javax.servlet.http.HttpSession httpSession)
ModelManager
instanceservletContext
- the applicationcurrent requesthttpSession
- the sessionpublic Customer getCustomer()
public void setCustomer(Customer newCustomer)
newCustomer
- the new current customerpublic void resetCustomer()
public boolean isCustomerLoggedIn()
public PizzaAccessor getPizzaAccessor()
public PersonalPizza getPersonalPizza()
public void setPersonalPizza(PersonalPizza newPersonalPizza)
newPersonalPizza
- The new current personal pizza object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |