| java.lang.Object olstore.domain.manager.UserManager
UserManager | public class UserManager (Code) | | A wrapper class for user actions so that there is no need to reference the
beans directly, allowing us to swap out the backend beans for a different
implementation.
|
Constructor Summary | |
public | UserManager(UserLocalHome home, UserHelper helper) Constructor for the manager which is populated by Spring. |
UserManager | public UserManager(UserLocalHome home, UserHelper helper)(Code) | | Constructor for the manager which is populated by Spring.
Parameters: home - a reference to the LocalHome interface Parameters: helper - a helper object |
createUser | public void createUser(UserValue user, AddressValue address) throws Exception(Code) | | Create a new user for customer in the store.
Parameters: user - the object representing the user Parameters: address - the object representing the customer throws: Exception - if an error occures while creating the new user |
findAll | public Collection findAll()(Code) | | Find all registered users in this store.
a collection of all users. |
findByUsername | public UserLocal findByUsername(String username)(Code) | | Find a user by their username.
Parameters: username - the username to lookup the UserLocal object for the user with the given username |
findFriendsThatPurchasedItem | public Collection findFriendsThatPurchasedItem(String username, Integer itemId)(Code) | | Returns a collection of all friends that have purchased the given item, and
are friends of the given user.
Parameters: username - the user whose friends we are interested in. Parameters: itemId - the item ID to see which friends have purchased. a collection of all friends that have purchased the given item, andare friends of the given user. |
findUserValue | public UserValue findUserValue(String username)(Code) | | Find a user with given name and return a POJO for that user.
Parameters: username - the username to lookup a plain java object for the user with the given username |
getOrders | public Collection getOrders(String username)(Code) | | Return all the orders that belong to the user.
Parameters: username - the username of the user whose orders are required a collection of OrderEntry objects that belong to this user |
saveUser | public void saveUser(UserValue user, AddressValue address, String username) throws Exception(Code) | | Save a user with the given username and all of their profile information
Parameters: user - the object representing the user Parameters: address - the object that contains the user's address Parameters: username - user's username throws: Exception - if an error occurs while saving user's information |
|
|