com.softslate.commerce.businessobjects.core
Interface User

All Superinterfaces:
BusinessObject
All Known Implementing Classes:
UserBean

public interface User
extends BusinessObject

Interface representing an end user accessing the system. In particular, a customer using the user interface to shop for and purchase products or an administrator configuring the store's administrative settings.

An instance implementing User is created on the first request of a user's session and is stored along with that session for as long as the user continues to access the application.

When the application needs to create an instance that implements User, BusinessObjectFactory finds the name of the Java class to instantiate from the "userImplementer" setting in the npcSetting database table.

The default "userImplementer" is UserBean.

Author:
David Tobey

Method Summary
 Administrator getAdministrator()
           
 Customer getCustomer()
          Retrieves the Customer object associated with this User.
 java.util.Locale getLocale()
          Retrieves the Locale in effect for this User.
 Order getOrder()
          Retrieves the Order this User is currently placing.
 void setAdministrator(Administrator administrator)
           
 void setCustomer(Customer customer)
          Sets the Customer object associated with this User.
 void setLocale(java.util.Locale locale)
          Sets the Locale in effect for this User.
 void setOrder(Order order)
          Sets the Order this User is currently placing.
 
Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessObject
initialize
 

Method Detail

getLocale

public java.util.Locale getLocale()
Retrieves the Locale in effect for this User. Useful to assist with the formatting of currencies and other localizations.

Returns:
The Locale in effect for this User.

setLocale

public void setLocale(java.util.Locale locale)
Sets the Locale in effect for this User. This Locale is set in the Struts layer directly after a User object is created in each user's session.

Returns:
The Locale in effect for this User.

getOrder

public Order getOrder()
Retrieves the Order this User is currently placing. This Order object is created when the user adds the first item to his or her cart. It is destroyed either when the user completes the order, or when his or her session ends.

Returns:
The Order this User is currently placing.

setOrder

public void setOrder(Order order)
Sets the Order this User is currently placing. This Order object is created when the user adds the first item to his or her cart. It is destroyed either when the user completes the order, or when his or her session ends.

Parameters:
order - The Order this User is currently placing.

getCustomer

public Customer getCustomer()
Retrieves the Customer object associated with this User. When a user logs in as a customer, this Customer object is created to store his or her account settings and other information.

Returns:
The Customer object associated with this User, or null, if the user has not logged in.

setCustomer

public void setCustomer(Customer customer)
Sets the Customer object associated with this User. When a user logs in as a customer, this Customer object is created to store his or her account settings and other information.

Parameters:
customer - The Customer object associated with this User.

getAdministrator

public Administrator getAdministrator()

setAdministrator

public void setAdministrator(Administrator administrator)


Copyright © SoftSlate, Inc. 2003–2005