Class UserBean
java.lang.Object
com.softslate.commerce.businessobjects.core.BaseBusinessObject
com.softslate.commerce.businessobjects.core.UserBean
- All Implemented Interfaces:
BusinessObject
,User
,Serializable
Represents an end user accessing the system.
UserBean
is the
default implementation of the User
interface for the
application.- Author:
- David Tobey
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate Administrator
private Customer
private Map
private Collection
private Locale
(package private) static org.apache.commons.logging.Log
private Order
private static final long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves theAdministrator
object associated with thisUser
.Retrieves theCustomer
object associated with thisUser
.Returns aMap
of any custom objects saved for thisUser
.Retrieves aCollection
ofString
s representing coupon codes entered by thisUser
.Retrieves theLocale
in effect for thisUser
.getOrder()
Retrieves theOrder
thisUser
is currently placing.void
setAdministrator
(Administrator administrator) Sets theAdministrator
object associated with thisUser
.void
setCustomer
(Customer customer) Sets theCustomer
object associated with thisUser
.void
setCustomMap
(Map customMap) Sets theMap
of custom objects for thisUser
.void
setEnteredCouponCodes
(Collection enteredCouponCodes) Sets theCollection
of coupon codes entered by thisUser
.void
Sets theLocale
in effect for thisUser
.void
Sets theOrder
thisUser
is currently placing.Methods inherited from class com.softslate.commerce.businessobjects.core.BaseBusinessObject
initialize
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessObject
initialize
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
log
static org.apache.commons.logging.Log log -
locale
- See Also:
-
order
- See Also:
-
customer
- See Also:
-
enteredCouponCodes
- See Also:
-
administrator
- See Also:
-
customMap
- See Also:
-
-
Constructor Details
-
UserBean
public UserBean()
-
-
Method Details
-
getLocale
Description copied from interface:User
Retrieves theLocale
in effect for thisUser
. Useful to assist with the formatting of currencies and other localizations. -
setLocale
Description copied from interface:User
Sets theLocale
in effect for thisUser
. ThisLocale
is set in the Struts layer directly after aUser
object is created in each user's session. -
getOrder
Description copied from interface:User
Retrieves theOrder
thisUser
is currently placing. ThisOrder
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. -
setOrder
Description copied from interface:User
Sets theOrder
thisUser
is currently placing. ThisOrder
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. -
getCustomer
Description copied from interface:User
Retrieves theCustomer
object associated with thisUser
. When a user logs in as a customer, thisCustomer
object is created to store his or her account settings and other information.- Specified by:
getCustomer
in interfaceUser
- Returns:
- The
Customer
object associated with thisUser
, ornull
, if the user has not logged in.
-
setCustomer
Description copied from interface:User
Sets theCustomer
object associated with thisUser
. When a user logs in as a customer, thisCustomer
object is created to store his or her account settings and other information.- Specified by:
setCustomer
in interfaceUser
- Parameters:
customer
- TheCustomer
object associated with thisUser
.
-
getEnteredCouponCodes
Description copied from interface:User
Retrieves aCollection
ofString
s representing coupon codes entered by thisUser
. When a user enters a coupon code at any point in the session, the code gets stored here for retrieval during discount processing.- Specified by:
getEnteredCouponCodes
in interfaceUser
- Returns:
- A
Collection
ofString
s representing coupon codes entered by thisUser
.
-
setEnteredCouponCodes
Description copied from interface:User
Sets theCollection
of coupon codes entered by thisUser
. When a user enters a valid coupon code, the code gets stored here for later retrieval during discount processing.- Specified by:
setEnteredCouponCodes
in interfaceUser
- Parameters:
enteredCouponCodes
- ACollection
ofString
s representing coupon codes entered by thisUser
.
-
getAdministrator
Description copied from interface:User
Retrieves theAdministrator
object associated with thisUser
. When a user logs in as an administrator, thisAdministrator
object is created to store his or her account settings and other information.- Specified by:
getAdministrator
in interfaceUser
- Returns:
- The
Administrator
object associated with thisUser
, ornull
, if the user has not logged in.
-
setAdministrator
Description copied from interface:User
Sets theAdministrator
object associated with thisUser
. When a user logs in as an administrator, thisAdministrator
object is created to store his or her account settings and other information.- Specified by:
setAdministrator
in interfaceUser
- Parameters:
administrator
- TheAdministrator
object associated with thisUser
.
-
getCustomMap
Description copied from interface:User
Returns aMap
of any custom objects saved for thisUser
. Custom developers may place objects in the map which need to be stored with the user throughout his session.- Specified by:
getCustomMap
in interfaceUser
- Returns:
- A
Map
of custom objects saved for thisUser
.
-
setCustomMap
Description copied from interface:User
Sets theMap
of custom objects for thisUser
. Custom developers may place objects in the map which need to be stored with the user throughout his session.- Specified by:
setCustomMap
in interfaceUser
- Parameters:
customMap
- AMap
of custom objects saved for thisUser
-