20
Project Description Document Cosc 304 MyBay Project 11/28/2007 1 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan Project Description MyBay Project University of British Columbia – Okanagan COSC 304 - Fall 2007 Team Members: Ali Hatami Jennifer Johnstone Nicholas Blackwell

Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

Project Description Document Cosc 304 MyBay Project

11/28/2007 1 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan

Project Description MyBay Project

University of British Columbia – Okanagan

COSC 304 - Fall 2007

Team Members:

Ali Hatami

Jennifer Johnstone

Nicholas Blackwell

Page 2: Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

Project Description Document Cosc 304 MyBay Project

11/28/2007 2 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan

TABLE OF CONTENTS

1.  INTRODUCTION..............................................................................................................................................3 

2.  EXECUTIVE SUMMARY................................................................................................................................3 

3.  WALK THROUGH ...........................................................................................................................................5 

3.1  UNREGISTERED USERS WALKTHROUGH ..........................................................................................................5 3.1.1  Home Page.............................................................................................................................................5 3.1.2  Search Page...........................................................................................................................................6 3.1.3  Item Page...............................................................................................................................................6 3.1.4  Registration............................................................................................................................................7 

3.2  REGISTERED USERS WALKTHROUGH...............................................................................................................8 3.2.1  Main Menu.............................................................................................................................................8 3.2.2  Watch Page............................................................................................................................................9 3.2.3  Account Page .......................................................................................................................................10 3.2.4  Create page..........................................................................................................................................10 

3.3  ADMINISTRATOR USERS WALKTHROUGH ......................................................................................................11 3.3.1  Manage Page .......................................................................................................................................11 

4.  MYBAY UPDATED ER DIAGRAM.............................................................................................................13 

5.  FEATURE DESCRIPTIONS..........................................................................................................................13 

5.1  REGISTRATION ...............................................................................................................................................13 5.2  LOG IN ...........................................................................................................................................................13 5.3  CREATE AUCTION ..........................................................................................................................................14 5.4  BID ON AN ITEM............................................................................................................................................14 5.5  ASSIST BUYER AND SELLER...........................................................................................................................14 5.6  BROWSE ITEMS ..............................................................................................................................................14 5.7  SUMMARY REPORTS.......................................................................................................................................14 5.8  WATCH LIST ..................................................................................................................................................14 5.9  ACCOUNT.......................................................................................................................................................14 5.10  BUY NOW ..................................................................................................................................................14 5.11  BUYER SELLER RATINGS ...........................................................................................................................15 5.12  IMAGES .....................................................................................................................................................15 

6.  HIGH LEVEL OVERVIEW...........................................................................................................................15 

7.  JSP FILE DESCRIPTIONS............................................................................................................................15 

7.1  TEMPLATE.TXT ..............................................................................................................................................16 7.2  MAIN.JSP........................................................................................................................................................16 7.3  SEARCH.JSP ....................................................................................................................................................16 7.4  ITEM.JSP.........................................................................................................................................................16 7.5  ADDAUCTION.JSP...........................................................................................................................................17 7.6  UPLOADPIC.JSP ..............................................................................................................................................17 7.7  DISPLAYIMAGE.JSP ........................................................................................................................................17 7.8  PROCESSFILEUPLOAD.JSP ..............................................................................................................................17 7.9  REGISTER.JSP .................................................................................................................................................17 7.10  WATCHCART.JSP.......................................................................................................................................17 7.11  ACCOUNT.JSP ............................................................................................................................................18 7.12  MANAGEMENT.JSP.....................................................................................................................................19 7.13  REPORT.JSP ...............................................................................................................................................19 7.14  CLOSEAUCTION.JSP...................................................................................................................................19 7.15  MAKEPAYMENT.JSP ..................................................................................................................................19 

8.  SITE LIMITATIONS ......................................................................................................................................20 

Page 3: Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

Project Description Document Cosc 304 MyBay Project

11/28/2007 3 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan

1. Introduction

The intent of this document is to give a summary of the MyBay Project, both textually and visually, describing the user and administrator features that we have implemented on the MyBay site.

2. Executive Summary

MyBay is a user based auction site that allows registered users to put items up for auction and bid on items in an auction. MyBay allows a registered user to play the dual role of a seller and a bidder while also allowing registered and non-registered users the option of searching for items that are up for auction. MyBay also provides special privileges to administrators, who also maintain the same capabilities of a registered.

MyBay allows users to auction off an item, provided that they are logged in with a valid user id and password. The seller is charged a $5.00 fee for every item that they put up for auction and they must pay this fee before their auction will become activated. Once the auction has reached its end date the seller is also charged 7% of the final auction price which must be paid before another auction can be activated by the seller. MyBay offers an online payment process to allow customers to pay any outstanding fees. When creating an auction the seller must provide an item name as well as a starting bid price, purchase price and an auction close date. The purchase price will be used for the “Buy It Now” feature which will allow a bidder to purchase an auction out right for a set price. Once an auction has reached its purchase price, either during the bidding process or with the use of the “Buy It Now” feature, the bidder will automatically win the auction, resulting in a closed auction. An auction will also be closed once the close date has passed. MyBay also allows the seller the option of adding a picture to their item, a brief description and a category selection.

Active auctions can be searched by non-registered users, registered users and administrators, however only registered users and administrators are given the opportunity to bid on auctions, “Buy It Now” or add it to their watch list. A customer’s unique watch list shows all auctions that the customer has created and all auctions that they have bid on, even if they are not currently the highest bidder. Customers can also add auctions to their watch list that they want to keep an eye on. The main purpose of the online auction site is to allow registered customers to bid on auctions until the pre-set close date. A customer who wishes to bid on an item must place a bid that is higher than the current bid. Once the auction is closed the highest bidder is stated to have won the auction and both the seller and the winner are notified by email. The seller is sent the winner’s email address so that they can arrange for payment and discuss shipment. The winner is also sent the seller’s email address to give them the option of contacting the seller and notify them that they won the auction (note that this part of the code is currently commented out because we do not have a UBC email address). We were unable to implement an online payment process to allow customers to

Page 4: Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

Project Description Document Cosc 304 MyBay Project

11/28/2007 4 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan

pay other customers for an auction but feel that the emails sent will provide sufficient communication to complete the transaction.

Since the customers play such a large role in the MyBay site it is necessary that a feature for rating sellers and winners be present. Sellers have the option of rating winners that they interact with and winners have the option to rate sellers that they interact with. The purpose of implementing this option is to instill confidence and trust among the users; however these ratings are not yet viewable by any users, other than the corresponding user.

The administrators of the site have selling and bidding capabilities, like regular registered users, as well as administrative capabilities. The administrators are responsible for maintaining the site, keeping track of sales and ensuring that the users are satisfied. MyBay allows these functions via the added Manage page. In maintaining MyBay, the administrators can generate reports on how the site is functioning as well as updating and fixing any technical problems that may occur since they have direct access to the database tables from the Manage page. To keep track of sales the administrators can quickly generate reports about how many items have been won/sold and the profits that resulted. The reports that are generated also include the number of current customers and the total number of open auctions. Unfortunately, we were unable to implement an online link to allow customers to Contact Us. However, in the event that a customer forgets their password a contact email address has been provided so that the administrators will be able to update the customer’s password and resolve the issue.

All in all the features that were implemented on MyBay adhered largely to the initial design plan. Although we were not able to implement all of the features outlined in our design document MyBay does contain all of the features required to allow the users to search, create, bid on and buy auctions.

Page 5: Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

Project Description Document Cosc 304 MyBay Project

11/28/2007 5 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan

3. Walk Through

The URL to get to the Home page of MyBay is: cs-suse-1.ok.ubc.ca/group1

3.1 Unregistered Users Walkthrough

The MyBay website is a membership based auction site, and although participating in auctions, such as bidding on or creating auctions is forbidden to unregistered users, basic navigation of the site is permitted.

3.1.1 Home Page

When an unregistered user first comes to MyBay they will notice that they have a limited number of options available. The navigation pane on the left hand side of the screen lists the pages available to them.

Figure 3.1 Unregistered User's MyBay Home page

The pages available to an unregistered user are:

• The Search page • The Register page • And the home page.

The home page is the first, and main, page that is displayed when a user visits MyBay. Here they have access to unsecured pages through the links to the search and register page and they can view hot auctions in the main display pane. Additionally if a user

Page 6: Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

Project Description Document Cosc 304 MyBay Project

11/28/2007 6 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan

wants to have access to the member pages they simple have to enter their Name and password into the log in form at the top of the page.

3.1.2 Search Page

When an unregistered user clicks on the search button in the navigation pane on the left of the screen they will be taken to the search page. Similarly, if they enter a search in the “Quick Search” box they will be forwarded here as well.

Figure 3.2 search page

Unregistered users can browse the active auctions here, by searching using keywords, or they can browse categories. Unregistered users can also view individual items and see the details for that auction by clicking on the “See Item” link.

3.1.3 Item Page

Unregistered users are restricted from bidding on and purchasing auctions, however they are permitted to view the item details page. Here member options are hidden from the unregistered users.

Page 7: Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

Project Description Document Cosc 304 MyBay Project

11/28/2007 7 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan

Figure 3.3 Item page

The auction details can be viewed from the item page. Here an unregistered user can view the image of the item, its description, start price, purchase price, as well as the current bid on the item.

3.1.4 Registration

To experience what MyBay has to offer a user must become a member. This is simple and free. To register at MyBay all that is required is a valid email address, unique name and a password. These can be set up in the registration page.

Figure 3.4 Registration page

Page 8: Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

Project Description Document Cosc 304 MyBay Project

11/28/2007 8 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan

Unregistered users can enter their information here to become a member this will give them access to creating auctions bidding and purchasing as well as their personal watch list and account. Your user information is stored securely on the MyBay database and you can change your details at anytime. If you are following along on the MyBay site please register yourself as a user now and move onto the next stage, a registered user.

3.2 Registered Users Walkthrough

Credentials of a registered user are checked in the database. So login attempts with invalid username or password will not pass the login page until valid credentials are provided.

3.2.1 Main Menu

After successfully logging in, a user will have access to more features of the site including watch list, create auctions and account information. The main menu will look like figure 3.5 for a registered user (note that once logged in the registration link are no longer present).

Figure 3.5 Registered Users MyBay Home page.

As seen in Figure 3.5 registered users have access to the following pages:

• Home page • Search page • Watch List page • Account page • Create Auction page

Page 9: Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

Project Description Document Cosc 304 MyBay Project

11/28/2007 9 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan

The Home page still displays Hot auctions and the Search page functions exactly as was described for an unregistered user except that the Auctions that are displayed are have added functionality. This added functionality allows the registered user to bid on Auctions, purchase auctions and add auctions to their Watch page. Also, as part of the registered user’s template each page also contains the user’s ratings, as a buyer and a seller. The user can Sign out at any time by clicking on “Sign out” at the top of any of the pages.

If you are following along please feel free to browse through the auctions via the Search page and try out the new features including “Add to Watch List”, “Make a Bid” and “Buy it Now”. Notice that each of the above buttons brings you to the next page, Watch page.

3.2.2 Watch Page

In using the Watch page a registered user can see information about auctions that they are have created or have add to their watch page via the Search page.

Figure 3.6 Watch page.

Through this page a registered user can perform the following activities.

• See the detail information about the item by clicking on “Auction “. • Make a Quick bid (if they are not the highest bidder and the auction is still

open) • Remove Auctions from the Watch list. • Buy an Auction for the purchase price that is posted in item details.

Page 10: Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

Project Description Document Cosc 304 MyBay Project

11/28/2007 10 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan

3.2.3 Account Page

A registered user can do the following activities using the Account page: • Pay owing balance from the past transactions. The “Pay Balance” button will

open another page that will accept a credit amount. This is a fake page and payment information will not be stored in the database. The Pay website updates the balance so that the user can activate an auction.

• “Buy More Credit”, if the balance is showing a credit (or zero balance) then the user can buy more credits using the “Buy More Credit” button.

• View a summary of his past activities. • Rate a seller or buyer that they have come into contact with. The Ratings are

based on a scale from 1 to 5, where 5 is the best. • Edit account information and user profile, including password. • Details of the auctioned item can be accessed on this page through

“AuctionX” button.

Figure 3.7 Account Page

3.2.4 Create page

The Create page allows a registered user to create auctions by entering the information of the item to be auctioned. Fields that are required are shown with stars beside the field name. After entering the information submit the information by clicking the “Submit” button. Through this page a registered user can upload a picture of the item into the database. Note that this action has been created but will not be activated until the user pays any outstanding fees. This can be done, as mentioned, on the Account page and is where the user is directed once the auction has been created.

Page 11: Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

Project Description Document Cosc 304 MyBay Project

11/28/2007 11 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan

Figure 3.8 Create page

We now ask that if you are following along on the MyBay site to try creating some auctions of your own. Then logout and log back in under the following test Administrator username and password to move on to the next stage, Administrator: Username: Test Password: 1234 (Note a public username and password for an Administrator is only supplied for marking purposes, it is highly unlikely that we would actually provide this.)

3.3 Administrator Users Walkthrough

An administrator has all of the same capabilities as a Customer but there are also some added options. That is to say an administrator has access to the Manage page and its subsequent pages, Close Auction and Report.

3.3.1 Manage Page

The manage page provide the following options the administrator: • View the database tables entirely as well as editing/deleting tuples and

inserting new tuples. • Close Auction – This allows the administrator to close any auctions that

are past there close date. • Generate reports.

The Manage page allows an Administrator to view all of the tables to ensure that the data is appropriate. To view a table click any of the displayed table names (to understand the

Page 12: Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

Project Description Document Cosc 304 MyBay Project

11/28/2007 12 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan

table references please see the Design Document). The Administrator also has the capability of editing/deleting any of the tuples in a database table via the “edit”, “delete” and “insert” buttons. You will notice that when the “edit” button is clicked the row moves to the top of the table and the “edit” button becomes an “Update” button. In order to complete an “edit” the Administrator must click “update” when finished. A snapshot of the Manage page, displaying the Category table, is provided below.

Figure 3.9 Manage with Tables

If you are following along to benefit in the next step we ask that you click on the “Close Auction” button to close any pending auctions (or possibly see that there are no “OPEN” auctions that need to be closed). Once you have done this please click on the Auction table and edit one of the “OPEN” auctions so that the date is now past due. Once you have done this click the “Close Auction” button again to see that this button allows you to close the auction manually and send the appropriate emails automatically (Note the emails that would be sent are displayed on the Close Auction page but are not actually sent to the seller and bidder as the code requires a UBC email account and has been commented out for the time being). The closed auction can be further verified by returning to the Manage page and checking to make sure that the Auction that you changed is now closed. Finally the “Report” button can be used to view a number auto – generated reports about the MyBay website. This now ends the walkthrough but please feel free to roam about as an unregistered user, a registered or an Administrator.

Page 13: Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

Project Description Document Cosc 304 MyBay Project

11/28/2007 13 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan

4. MyBay Updated ER Diagram

Figure 4.1 ER Diagram

5. Feature Descriptions

This section describes the features of the MyBay web auction site.

5.1 Registration

Any user of the MyBay web site can have an account with MyBay. Users can register with MyBay by using the registration page. Entering a unique user name and password and a valid email address is all that is required.

5.2 Log In

When a user navigates to MyBay they are considered to be an unregistered user. If they have an account with MyBay they can log in to access customer features unavailable to unregistered users.

Page 14: Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

Project Description Document Cosc 304 MyBay Project

11/28/2007 14 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan

5.3 Create Auction

Registered users can create their own auctions. A registered user can create as many auctions as they want. Although, if a user has a balance with MyBay the balance must be paid before they can activate their auction.

5.4 Bid On An Item

Registered users can bid on an item. If an item is bid on the user become the new highest bidder and potentially could win the auction.

5.5 Assist Buyer And seller

When an auction ends, MyBay closes the auction. MyBay assists the buyer and seller in the auction by emailing both parties to help them arrange shipping and payment.

5.6 Browse Items

Browsing Items is made possible through a search page that is available to unregistered users as well as customers. Users can search by keyword or browse by category.

5.7 Summary Reports

MyBay allows administrators to create status reports of the site. This includes items bought and sold, number of current auctions and financial information about current auctions.

5.8 Watch List

MyBay provides registered customers with a watch list. Similar to a shopping cart, users can save items in there watch list, as well make bids from there watch list and even purchase an item at its reserve price. Users can also remove items that they lose interest in. Additionally if a customer creates an auction it is automatically added to their watch list.

5.9 Account

My Bay provides an account to each registered member. A customer can use their account to update their personal information, activate auctions that they’ve created, pay balances, rate auctioneers and buyers that they’ve done business with, as well as edit those auctions that are inactive, before they activate them.

5.10 Buy now

MyBay Auctions have a reserve price. If a customer is willing to pay the reserve they can buy that item and the auction is immediately closed.

Page 15: Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

Project Description Document Cosc 304 MyBay Project

11/28/2007 15 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan

5.11 Buyer Seller ratings

MyBay does not complete the shipping and payment procedure so as a way to encourage honest customers, MyBay allows users to rate other users that they’ve sold to and bought from.

5.12 Images

MyBay auctions include images.   

6. High Level Overview

The MyBay users are classified into 3 categories, unregistered users, customers, and administrators. Each user is granted different privileges. Unregistered users are able to brose the items on the site using the fully functional search. They can also register to become a customer. Customers have access to the search functions as well as their own watch list and account. Customers can create, bid on and purchase auctions. Additionally, customers can edit their user, and auction details (if the auction has not been activated). Administrators are customers that have the same privileges as regular customers; however, they also have access to the management page and its functions. As part of the management page they can generate reports, close auctions and edit the database. Administrators are considered to be trusted and have unlimited access to the MyBay data. MyBay auctions have a start price a purchase price and an end date. When an auction ends, if it sells, the MyBay system emails both the buyer and seller so they can arrange shipment and payment. At this point an auction is closed. When an auction closes the buyer and seller can then rate each other. MyBay customers use the search page to browse items and put interesting items in their watch list. Items in can be removed, bid on, and bought from the users watch list. Additionally, items can be viewed in detail from the watch list, and from the search page. The details page allows users to bid on, and purchase the auction as well. MyBay customers can create and activate auctions. A customer uses their account to edit activate and delete auctions as well as view and edit their own user details.

7. JSP File Descriptions

This section describes the JSP files created and used in the MyBay project. The functions that the files implement are outlined in detail.

Page 16: Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

Project Description Document Cosc 304 MyBay Project

11/28/2007 16 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan

7.1 Template.txt

Template.txt is a text file that contains static java methods used to create the graphical interface, the Navigation pane, and log in pane of the MyBay site. Additionally, Template.txt contains the functions responsible for enforcing the underlying security of each page. Every JSP page that is part of the MyBay site includes this file and calls its main methods.

The main methods of the Template.txt file are:

• Open Template - opens the default html page tags and prints the background

image. • Check for Logouts - removes session parameters when a user logs out • User Account - prints the log in menu, and returns the user type which is

either: invalid, customer, or administrator. • Redirect - takes a list of user types and redirects users that are on that list to a

specified page. • Left Menu - prints the navigation menu and depending on the user type it

hides some menus. • Open Template Page Layer - opens the layer for which the specific page is to

print on. This is the main layer. • Close Template Layers - closes the html tags.

Additionally the template defines the database connection as well as other global variables that each page can access.

7.2 Main.jsp

Main.jsp is the home page for the MyBay site. When a user logs off of any member page they are redirected to Main.jsp. This contains the methods for calculating the top 3 auctions based on the number of bids placed that auction from the database. Main.jsp displays the auctions on the main page layer with links to their corresponding item.jsp page. All users can view Main.jsp.

7.3 Search.jsp

Search.jsp allows a user to browse and search the database to find auctions. Auctions in the database can be viewed and added to a users watch list as long as the WatchCart.jsp and item.jsp authorize this request. Items are list by their name in the Items table. And are searched using the ‘like’ command on the database.

7.4 Item.jsp

Item.jsp receives an id of an item in the database and displays the item’s fields in a graphical display. Depending on the user type and status of the auction that the item

Page 17: Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

Project Description Document Cosc 304 MyBay Project

11/28/2007 17 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan

belongs to the bid on, add to watch, and buy now features may be disabled. Auctions that have ended or are inactive are only visible to users that created the auction.

7.5 AddAuction.jsp

AddAuction.jsp prints the form to enter the fields for a new auction into database. Upon submission of the form, the fields are sent to UploadPic.jsp for processing.

7.6 UploadPic.jsp

UplaodPic.jsp receives the values from AddAuction.jsp and does error checking to ensure that they are valid for a new auction. The new auction is entered into the database and its status is set to null. Also the newly created auction is added to the seller’s watch List at this point. UploadPic.jsp displays a form that the user can use to upload an optional picture into the database. The picture information is forwarded to ProcessFileUpload.jsp where the file is sent to the database. If the user does not want to add a picture they can skip this step by clicking the skip button which directs the user to their Account page.

7.7 DisplayImage.jsp

DisplayImage.jsp receives the itemId from a corresponding page and queries the Blob data from the “pic” field. The data is converted into an image and displayed on the website as required.

7.8 ProcessFileUpload.jsp

ProcessFileUpload.jsp receives a file from a user of the MyBay site and adds it to the auction that is being created, as a BLOB data type, by updating the Item table,

7.9 Register.jsp

Register.jsp prints a registration form to the screen for a non registered user to complete. The fields of this form are then sent to Account.jsp for processing.

7.10 WatchCart.jsp

WatchCart.jsp displays all of the auctions that a customer has added to their watch list. This data is stored in the database table Watch. For every entry in the table, and for the corresponding customer, WatchCart.jsp displays whether or not the Auction belongs to that customer. If it does then Watch restricts bidding and purchasing only for that customer. If the auction does not belong to the user then bidding and purchasing are allowed and a quick bid and purchase button are displayed. If the user is the top bidder then the quickBid form is hidden. Otherwise WatchCart.jsp displays the current highest bidder. WatchCart.jsp also displays an image of the auction item and a link to the corresponding item page for each auction.

WatchCart.jsp is also responsible for computing bids and adding Auctions to the Watch table. Each auction has a state; open, closed, or null. WatchCart.jsp only allows an auction

Page 18: Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

Project Description Document Cosc 304 MyBay Project

11/28/2007 18 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan

to be bid on if it is open, the purchase price is not met, or the auction close date has not been reached. Additionally, a customer cannot bid on their own auction. If WatchCart.jsp decides that an auction cannot be bid on it is displayed as closed even if its status has not yet been set to closed. Null auctions are considered to be inactive auctions, and can only be added to a users watch list if they created it. WatchCart.jsp prints an activate link for auctions in the users watch list that are inactive. The activate link forwards the customer to their account page. WatchCart.jsp does not give a user the option to remove their auction from the watch list if they created that auction.

7.11 Account.jsp

Account.jsp is one of the major JSP files of the MyBay site. Amongst its many responsibilities Account.jsp prints the user’s specific data to the screen which includes the users account balance, a link to the makePayment.jsp page, any auctions that are inactive, and any finished auctions, whether won or sold. A link is also provided to rate buyers and sellers. Moreover, Account.jsp also displays the customer’s information.

When an instance of the Account.jsp page is executed it processes the following requests:

• New registrations • Payments • Auction activations • Edits to user details • Edits to inactive auctions • Buyer Seller ratings

When a user registers at the Registration page, the user information is sent to Account.jsp through the post method. Account.jsp makes sure that users name and password are unique and that the email is well formed. The other user information is not required, but any information given is stored in the database.

Account.jsp enforces payments indirectly. A user can create an account, create an auction, and activate an auction for free. However, once the customer’s first auction is activated Account.jsp will charge the customer’s account and will not allow another auction to be activated until the balance is zero. The balance is calculated starting from their first auction at a base cost of $5 and a final charge of 7% of their total selling price for that auction when it closes. The customers balance must be zero or there must be a credit for the activate function to be enabled.

When a user has created an auction they are directed to Account.jsp where they can activate their auction. If they have no balance owing to MyBay, Account.jsp will provide a link to activate their auction. Otherwise they are blocked from activating their auction. This link redirects the customer back to Account.jsp where the activation details are read from the post method.

Page 19: Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

Project Description Document Cosc 304 MyBay Project

11/28/2007 19 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan

Account.jsp provides the customer with a function to edit their user information. The edit user function verifies that the username is not null and is unique, the password is typed the same twice and that the email is well formed. The details that the user enters are changed on the database in the Customer table.

Inactive auctions that belong to the customer are displayed by Account.jsp; the details of the auction can be changed here, prior to activation. The start price, purchase price, end date, description, name, and category can be changed. This data is updated in the databases Auction table, and the Item table. Account.jsp displays a list of auctions won and sold by the customer. Account.jsp also gives the customer the option of rating the buyer or seller of the auction they sold to or won from, respectively. This function also redirects back to Account using the post method giving it the rating details to calculate. Account.jsp adds this information to the BuyerRating and SellerRating tables, and only allows a customer to rate another customer once for each auction that they have in common.

7.12 Management.jsp

Management.jsp is responsible for providing management functions to users with administer privileges. Management.jsp provides a link to the closeAuction.jsp page, and a link to the Report.jsp page. Management.jsp provides a database management tool that allows the administrator to access and edit any field of the database. The database is displayed graphically to the user and rows can be deleted updated and inserted into any table. The database management tool is written in Template.txt so any JSP page may access it however only management.jsp does so at this time.

7.13 Report.jsp

Report.jsp is accessed through the Management page and it calculates statistics about the site. Such as the number of customers, open and closed auctions goods sold and sums of money transferred between customers and to MyBay.

7.14 CloseAuction.jsp

CloseAuction.jsp is accessed through the Management page, Management.jsp and when it is instantiated, it queries the database to find any databases where the close date is less than the current date or where the total is equal to the purchase price. These auctions, if they are not already set to Closed are done so. CloseAuction.jsp emails the buyer and seller to assist in setting up the final sale.

7.15 MakePayment.jsp

MakePayment.jsp is a very simple JSP file that displays a payment form allowing the customer the option to pay MyBay. A customer can set an amount and select to pay by Visa or MasterCard and enter payment details. By default the payment amount is equal to their account balance stored in the Payments table of the database. This function, however,

Page 20: Project Description MyBay Project University of British Columbia – … · 2009. 7. 30. · Project Description Document Cosc 304 MyBay Project 11/28/2007 6 COSC 304 – MyEBAY.DOC

Project Description Document Cosc 304 MyBay Project

11/28/2007 20 COSC 304 – MyEBAY.DOC University of British Columbia Okanagan

does not really read any credit card information. For the purposes of this project it pretends that the payment is verified and subtracts the payment from the account balance.

8. Site Limitations

MyBay is limited in by the following restrictions:

• Email correspondence is not functional. • Ratings are not displayed to all users. • History of bids is not displayed for any users. • Online payment of MyBay fees is superficial.