The implementation of the OlstoreFacade class, used for interacting
with the backend beans without directly referencing objects that can be replaced.
Actions are done through Manager classes which wrap the classes that can be removed and
replaced with new implementations.
findByMainPageAndFriendsOf(String username) Finds all items that have been marked for the main page, and
have been purchased by friends of the user.
Parameters: username - the user's name.
getPictureById(String itemId) Returns a PictureValue that matches the given item's ID.
Parameters: itemId - the ID for the item whose picture is to be returned.
getPropertiesForType(String type) Returns a collection of properties for the given type.
Parameters: type - the type whose properties will be returned.
Finds all items that have been marked for the main page, and
have been purchased by friends of the user.
Parameters: username - the user's name. a collection of all items that have been marked for the main page,and have been purchased by friends of the user.
Finds all items that have been marked for the main page, and are on special.
a collection of all items that have been marked for the main page and areon special.
Get a map of all the friends of the current user for each one of the items
in the collection.
Parameters: username - the currently logged in user Parameters: items - the items that will be included in the friends map
Returns an ItemValue that matches the given ID.
Parameters: itemId - the ID of the item to be returned. an ItemValue for the item represted by the item ID.
Returns a collection of all orders placed by the user.
Parameters: username - the user whose orders we are returning. a Collection of all orders by username.
Returns a PictureValue that matches the given item's ID.
Parameters: itemId - the ID for the item whose picture is to be returned. a picture that belongs to the item given by itemId.
Returns a collection of properties for the given type.
Parameters: type - the type whose properties will be returned. a collection of properties for the given type.
Returns a cart manager for the given user.
Parameters: username - the username for the desired user's cart. a cart manager object that can be used to interact with the user's shopping cart.
Returns all items that have been purchased by the user.
Parameters: username - the name of the user. a Collection of all items that have been purchased by the user.
Record this item as interesting to the user.
Parameters: itemId - the ID of the item the user wants to mark as interesting Parameters: user - the username of the currently logged in user throws: Exception - if there is an error making the change
Saves the user given into backend storage.
Parameters: user - the user to save. Parameters: address - the address of the user. Parameters: username - the user's name.
Sets the status of the order given by ID with the given status.
Parameters: id - the ID of the order. Parameters: status - the new status for the order.