java.lang.Object
com.softslate.commerce.businessobjects.core.BaseBusinessObject
com.softslate.commerce.businessobjects.core.UserBean
All Implemented Interfaces:
BusinessObject, User, Serializable

public class UserBean extends BaseBusinessObject implements 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 Details

  • Constructor Details

    • UserBean

      public UserBean()
  • Method Details

    • getLocale

      public Locale getLocale()
      Description copied from interface: User
      Retrieves the Locale in effect for this User. Useful to assist with the formatting of currencies and other localizations.
      Specified by:
      getLocale in interface User
      Returns:
      The Locale in effect for this User.
    • setLocale

      public void setLocale(Locale locale)
      Description copied from interface: User
      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.
      Specified by:
      setLocale in interface User
    • getOrder

      public Order getOrder()
      Description copied from interface: User
      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.
      Specified by:
      getOrder in interface User
      Returns:
      The Order this User is currently placing.
    • setOrder

      public void setOrder(Order order)
      Description copied from interface: User
      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.
      Specified by:
      setOrder in interface User
      Parameters:
      order - The Order this User is currently placing.
    • getCustomer

      public Customer getCustomer()
      Description copied from interface: User
      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.
      Specified by:
      getCustomer in interface User
      Returns:
      The Customer object associated with this User, or null, if the user has not logged in.
    • setCustomer

      public void setCustomer(Customer customer)
      Description copied from interface: User
      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.
      Specified by:
      setCustomer in interface User
      Parameters:
      customer - The Customer object associated with this User.
    • getEnteredCouponCodes

      public Collection getEnteredCouponCodes()
      Description copied from interface: User
      Retrieves a Collection of Strings 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.
      Specified by:
      getEnteredCouponCodes in interface User
      Returns:
      A Collection of Strings representing coupon codes entered by this User.
    • setEnteredCouponCodes

      public void setEnteredCouponCodes(Collection enteredCouponCodes)
      Description copied from interface: User
      Sets the 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.
      Specified by:
      setEnteredCouponCodes in interface User
      Parameters:
      enteredCouponCodes - A Collection of Strings representing coupon codes entered by this User.
    • getAdministrator

      public Administrator getAdministrator()
      Description copied from interface: User
      Retrieves the 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.
      Specified by:
      getAdministrator in interface User
      Returns:
      The Administrator object associated with this User, or null, if the user has not logged in.
    • setAdministrator

      public void setAdministrator(Administrator administrator)
      Description copied from interface: User
      Sets the 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.
      Specified by:
      setAdministrator in interface User
      Parameters:
      administrator - The Administrator object associated with this User.
    • getCustomMap

      public Map getCustomMap()
      Description copied from interface: User
      Returns a 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.
      Specified by:
      getCustomMap in interface User
      Returns:
      A Map of custom objects saved for this User.
    • setCustomMap

      public void setCustomMap(Map customMap)
      Description copied from interface: User
      Sets the 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.
      Specified by:
      setCustomMap in interface User
      Parameters:
      customMap - A Map of custom objects saved for this User