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
FieldsModifier and TypeFieldDescriptionprivate Administratorprivate Customerprivate Mapprivate Collectionprivate Locale(package private) static org.apache.commons.logging.Logprivate Orderprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves theAdministratorobject associated with thisUser.Retrieves theCustomerobject associated with thisUser.Returns aMapof any custom objects saved for thisUser.Retrieves aCollectionofStrings representing coupon codes entered by thisUser.Retrieves theLocalein effect for thisUser.getOrder()Retrieves theOrderthisUseris currently placing.voidsetAdministrator(Administrator administrator) Sets theAdministratorobject associated with thisUser.voidsetCustomer(Customer customer) Sets theCustomerobject associated with thisUser.voidsetCustomMap(Map customMap) Sets theMapof custom objects for thisUser.voidsetEnteredCouponCodes(Collection enteredCouponCodes) Sets theCollectionof coupon codes entered by thisUser.voidSets theLocalein effect for thisUser.voidSets theOrderthisUseris currently placing.Methods inherited from class com.softslate.commerce.businessobjects.core.BaseBusinessObject
initializeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:UserRetrieves theLocalein effect for thisUser. Useful to assist with the formatting of currencies and other localizations. -
setLocale
Description copied from interface:UserSets theLocalein effect for thisUser. ThisLocaleis set in the Struts layer directly after aUserobject is created in each user's session. -
getOrder
Description copied from interface:UserRetrieves theOrderthisUseris currently placing. ThisOrderobject 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:UserSets theOrderthisUseris currently placing. ThisOrderobject 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:UserRetrieves theCustomerobject associated with thisUser. When a user logs in as a customer, thisCustomerobject is created to store his or her account settings and other information.- Specified by:
getCustomerin interfaceUser- Returns:
- The
Customerobject associated with thisUser, ornull, if the user has not logged in.
-
setCustomer
Description copied from interface:UserSets theCustomerobject associated with thisUser. When a user logs in as a customer, thisCustomerobject is created to store his or her account settings and other information.- Specified by:
setCustomerin interfaceUser- Parameters:
customer- TheCustomerobject associated with thisUser.
-
getEnteredCouponCodes
Description copied from interface:UserRetrieves aCollectionofStrings 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:
getEnteredCouponCodesin interfaceUser- Returns:
- A
CollectionofStrings representing coupon codes entered by thisUser.
-
setEnteredCouponCodes
Description copied from interface:UserSets theCollectionof 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:
setEnteredCouponCodesin interfaceUser- Parameters:
enteredCouponCodes- ACollectionofStrings representing coupon codes entered by thisUser.
-
getAdministrator
Description copied from interface:UserRetrieves theAdministratorobject associated with thisUser. When a user logs in as an administrator, thisAdministratorobject is created to store his or her account settings and other information.- Specified by:
getAdministratorin interfaceUser- Returns:
- The
Administratorobject associated with thisUser, ornull, if the user has not logged in.
-
setAdministrator
Description copied from interface:UserSets theAdministratorobject associated with thisUser. When a user logs in as an administrator, thisAdministratorobject is created to store his or her account settings and other information.- Specified by:
setAdministratorin interfaceUser- Parameters:
administrator- TheAdministratorobject associated with thisUser.
-
getCustomMap
Description copied from interface:UserReturns aMapof 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:
getCustomMapin interfaceUser- Returns:
- A
Mapof custom objects saved for thisUser.
-
setCustomMap
Description copied from interface:UserSets theMapof 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:
setCustomMapin interfaceUser- Parameters:
customMap- AMapof custom objects saved for thisUser
-