110 likes | 196 Vues
J2EE Project. Michele Santoro 682174 Alberto Tretti 680753 Vincenzo Frascino 681316. Given the Context and Requirements. High level design:. Client Tier: Web pages to implement the user interface. Web Tier: Web components for providing end-users with web pages to access the PayServ.
E N D
J2EE Project Michele Santoro 682174 Alberto Tretti 680753 Vincenzo Frascino 681316
Given the Context and Requirements High level design: Client Tier: Web pages to implement the user interface. Web Tier: Web components for providing end-users with web pages to access the PayServ Business Tier: EJB’s that implement the logic of PayServ and payment manager DBMS
Web Tier (1) • Login.jsp : a page where the user can perform the login. • Logged.jsp : displays a list of pending payment requests sorted by date with a link to MoneyWeb to perform the payment, or a list of closed payments for which the payment process has been completed. has reference Login.jsp PersonalPaymentManager Logged.jsp PaymentIntegration PaymentRequestManager Web Module PayServ
Web Tier (2) index.jsp The username is saved in a Session Login.jsp MyPage.htm logged.jsp?page=1 logged.jsp?page=2 MONEYWEB
AService • add.jsp : a demonstration page is provided for adding a payment request. index.jsp add.jsp addConfirm.jsp
MoneyWeb • pay.jsp : a demonstration page is provided for completing payments. from logged.jsp?page=1 Business Tier PaymentIntegration setPaid(int) pay.jsp ok.jsp to MyPage.htm index.jsp
DataBase ‘PayServ’ Payment Table: Id | Requestor | User | Description | Amount | Date | Paid | PaymentDate references foreign key Service Table: Id | Name User Table: Id | Name
Business Tier (1) Entities: • Service : entity bean representing a service that is deployed in the platform and can request a payment from a user. Through this entity the application models the source of a payment request. • User : entity bean representing a single end-user. • PaymentRequest : entity bean representing a single request of payment, whether paid or still to be paid (many-to-one with User and many-to-one with Service)
Business Tier (2) Session Beans: • PaymentRequestManager : session bean providing basic methods for adding a new payment request. It provides a way for deployed services to interact with PayServ in order to request a new payment or for checking the status of a payment. • PersonalPaymentManager : session bean providing basic methods for implementing the user interface of PayServ. This is the basic method for a user to get the details about each single requested payment and to pay. • PaymentIntegration : session bean for integrating with the external payment company. It provides a method for setting a payment as completed.
Business Tier (3) PayServ Database PersonalPaymentManager getPayments(int) Payment Table SELECT distinct p FROM Payment as p WHERE p.paid=0 AND p.user= uID ORDER BY date creates PersonalPayment Accessible from the web tier
Business Tier (4) PayServ Database SELECT distinct p FROM Payment as p WHERE p.user= uID PaymentIntegration setPaid(int) Payment Table PaymentRequestManager add(PaymentRequest) PaymentRequest Accessible from the web tier