|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface User
Interface representing an end user accessing the system. In particular, either 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. It is stored as a session attribute
named "user".
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 appComponents.properties
file.
The default "userImplementer" is
UserBean
.
Method Summary | |
---|---|
Administrator |
getAdministrator()
Retrieves the Administrator object associated with this
User . |
Customer |
getCustomer()
Retrieves the Customer object associated with this
User . |
java.util.Map |
getCustomMap()
Returns a Map of any custom objects saved for this
User . |
java.util.Collection |
getEnteredCouponCodes()
Retrieves a Collection of String s
representing coupon codes entered by 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)
Sets the Administrator object associated with this
User . |
void |
setCustomer(Customer customer)
Sets the Customer object associated with this
User . |
void |
setCustomMap(java.util.Map data)
Sets the Map of custom objects for this User . |
void |
setEnteredCouponCodes(java.util.Collection enteredCouponCodes)
Sets the Collection of coupon codes entered by 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 |
---|
java.util.Locale getLocale()
Locale
in effect for this User
.
Useful to assist with the formatting of currencies and other
localizations.
Locale
in effect for this User
.void setLocale(java.util.Locale locale)
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.
Order getOrder()
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.
Order
this User
is currently
placing.void setOrder(Order order)
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.
order
- The Order
this User
is currently
placing.Customer getCustomer()
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.
Customer
object associated with this
User
, or null
, if the user has
not logged in.void setCustomer(Customer customer)
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.
customer
- The Customer
object associated with this
User
.java.util.Collection getEnteredCouponCodes()
Collection
of String
s
representing coupon codes entered by this User
. When a
user enters a coupon code at any point in the session, the code gets
stored here for retrieval during discount processing.
Collection
of String
s
representing coupon codes entered by this User
.void setEnteredCouponCodes(java.util.Collection enteredCouponCodes)
Collection
of coupon codes entered by this
User
. When a user enters a valid coupon code, the code
gets stored here for later retrieval during discount processing.
enteredCouponCodes
- A Collection
of String
s
representing coupon codes entered by this User
.Administrator getAdministrator()
Administrator
object associated with this
User
. When a user logs in as an administrator, this
Administrator
object is created to store his or her
account settings and other information.
Administrator
object associated with this
User
, or null
, if the user has
not logged in.void setAdministrator(Administrator administrator)
Administrator
object associated with this
User
. When a user logs in as an administrator, this
Administrator
object is created to store his or her
account settings and other information.
administrator
- The Administrator
object associated with this
User
.java.util.Map getCustomMap()
Map
of any custom objects saved for this
User
. Custom developers may place objects in the map
which need to be stored with the user throughout his session.
Map
of custom objects saved for this
User
.void setCustomMap(java.util.Map data)
Map
of custom objects for this User
.
Custom developers may place objects in the map which need to be stored
with the user throughout his session.
data
- A Map
of custom objects saved for this
User
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |