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

## de.ix.jspTutorial.controller
Class ModelManager

    java.lang.Object
      |
      +--de.ix.jspTutorial.controller.ModelManager

public class ModelManager
extends java.lang.Object
implements SessionConstants

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.

Version:
  $Id:$
Author:
  Peter Rossbach (pr@webapp.de), Lars Röwekamp ( lars.roewekamp@openKnowledge.de)

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
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait`

Field Detail

### vcid

    public static java.lang.String vcid

  Version des Source

### myApplication

    private javax.servlet.ServletContext myApplication

  Application

### httpSession

    private javax.servlet.http.HttpSession httpSession

  Session des ModelManagers

Constructor Detail

### ModelManager

    public ModelManager()

Method Detail

### init

    public void init(javax.servlet.ServletContext servletContext,
                     javax.servlet.http.HttpSession httpSession)

  Initialize method for the `ModelManager` instance
  Parameters:
    `servletContext` - the applicationcurrent request
    `httpSession` - the session

### getCustomer

    public Customer getCustomer()

  Get the current customer object.
  Returns:
    the current customer object

### setCustomer

    public void setCustomer(Customer newCustomer)

  Set the current customer object.
  Parameters:
    `newCustomer` - the new current customer

### resetCustomer

    public void resetCustomer()

  Reset the current customer object.

### isCustomerLoggedIn

    public boolean isCustomerLoggedIn()

  Check if there is a valid customer object.

### getPizzaAccessor

    public PizzaAccessor getPizzaAccessor()

  Get pizza accessor object.
  Returns:
    A pizza accessor object

### getPersonalPizza

    public PersonalPizza getPersonalPizza()

  Get the current personal pizza object.
  Returns:
    The current personal pizza object

### setPersonalPizza

    public void setPersonalPizza(PersonalPizza newPersonalPizza)

  Set the current personal pizza object.
  Parameters:
    `newPersonalPizza` - The new current personal pizza object

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

~ Das iX JSP Tutorial III - © 2000 by Peter Roßbach ~