My Links Design Document V.0.8

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View My Links Design Document V.0.8 as PDF for free.

More details

  • Words: 2,935
  • Pages: 19
EPT Technical Specification

My Links Version 0.8 Last Saved: 1/3/2007 Revision History Revision Date 0.1 10/9/2006 0.2 10/10/2006 0.3 10/11/2006 0.4 10/12/2006 0.5 10/30/2006 0.6 11/8/2006 0.7 12/14/2006

0.8

1/3/2007

Modified by Deepika Mathur Joe Gronemeyer Deepika Mathur Prashanth Kamath Deepika Mathur Deepika Mathur Deepika Mathur

Comment Draft created Reviewed and added comments. Comments incorporated Reviewed Feedback incorporated. Answered open questions. Updated after code review: 2.3.1 Class diagram for DBUtils and JSFileGenerator updated. 5.1 Class component paths added and method descriptions updated per class diagram in Details. 5.2 JSP component paths added.

Deepika Mathur

2.4.8 Added bullet 5 to validate the form text input types.

Contributors

1 Introduction................................................................................................................................... ......................1

1.1 REQUIREMENTS/BUSINESS RULES..............................................................................................................1 1.2 ASSUMPTIONS........................................................................................................................................1 2 Detailed Design.............................................................................................................................. ......................1

2.1 PRIMARY USE CASE................................................................................................................................2 2.2 CUSTOM LOOK AND FEEL........................................................................................................................3 2.2.1 Description.................................................................................................................................3 2.2.2 Screenshots.................................................................................................................................3 2.3 DIAGRAMS............................................................................................................................................5 2.3.1 Class Diagram............................................................................................................................5 2.3.2 Sequence Diagrams....................................................................................................................6 2.3.3 Event Traces...............................................................................................................................9 2.4 OTHER CONSIDERATIONS.......................................................................................................................10 2.4.1 Security.....................................................................................................................................10 2.4.2 Performance/Scalability...........................................................................................................10 2.4.3 Concurrency.............................................................................................................................10 2.4.4 Persistence and Caching..........................................................................................................10 2.4.5 Potential for Reuse....................................................................................................................11 2.4.6 External Dependencies.............................................................................................................11 2.4.7 Communication.........................................................................................................................11 2.4.8 Exception Handling..................................................................................................................11 2.4.9 Maintenance/Ease of Support...................................................................................................12 3 Configuration............................................................................................................................................ .........12 4 Cross-Component Impacts............................................................................................................................ ....12 5 Included Components.................................................................................................................................... ....12

5.1 JAVA CLASSES......................................................................................................................................12 5.2 JSPS..................................................................................................................................................14 5.3 OTHER COMPONENTS............................................................................................................................16 6 Unit Test Exit Criteria......................................................................................................................... ..............16 7 Open questions............................................................................................................................................ .......16

1 Introduction My Links is a functionality provided in the portal and the GCE that enables the registered users to store and organize their favorite links/sites and organize them into folders. The users can view their links irrespective of the workstation from which they access the Next Generation Portal.

1.1 Requirements/Business Rules •

Refer to the EPT_2_0_Functional Specifications_v1.2.doc (URL: http://nyc-db06.jpmorganchase.com/pks/gtlxm102pks.nsf/0/630C2D03116A7F4F852571BE0068417B?OpenDocume nt )

1.2 Assumptions • •

All browsers are JavaScript enabled. The static text used within the My Links application is not going to change and will remain hard-coded in the JSPs.

2 Detailed Design •

The user’s customization of the MyLinks is supported by a library of independent JSPs. Refer to Section 5.2 and Fig. 1. The user favorites are persisted to the database by these JSP components and the DBUtils.class. To improve performance, the user’s favorites are also persisted to the web server’s file system in the form of a .js file. There is a .js for each user that has customized My Links. This file is generated by JSFileGenerator class.



Most of the code for My Links will be forklifted from the previous platform. The only major change pertains to the connection pool used in the previous platform. The application does not use a connection pool now and gets the connection from the datasource.



The My Links drop-down would be provided by the GCE and is supported by a library of JS files. See External Dependencies in Section 2.4.6. The drop down menu is generated from the list of links in the .js file (on the web server file system) by the library of JS files.



To improve performance, the list of links is retrieved (from the .js on the web server) only when the user clicks on the My Links button as the list is not needed until the button is actually clicked. Doing this reduces the number of requests, thereby reducing the traffic on the platform.



CSS classes are used to define the look and feel of the JSP pages.

JP Morgan Chase & Co. Internal Use Only

1

Fig. 1 My Links Component Architecture

2.1 Primary Use case 1) Edit Link(s) or Folder(s) This Use case is supported by addEditMyLinks.jsp. Refer to the Section 5.2 for a description of this component. Refer to Fig. 9 and Fig. 12 in the Sequence diagram section. 2) Add Link(s) This Use case is supported by addLinks.jsp. Refer to the Section 5.2 for a description of this component. Refer to Fig. 10 in the Sequence diagram section. 3) Add Folder(s) This Use case is supported by addFolder.jsp. Refer to the Section 5.2 for a description of this component. Refer to Fig. 11 in the Sequence diagram section. 4) Delete Link(s) or Folder(s) This Use case is supported by deleteLink.jsp. Refer to the Section 5.2 for a description of this component. Refer to Fig. 13 in the Sequence diagram section. 5) Organize Link(s) This Use case is supported by organizeLinks.jsp. Refer to the Section 5.2 for a description of this component. Refer to Fig. 14 in the Sequence diagram section. Note: Refer to Fig. 16 for an event trace chart of the My Links application. JP Morgan Chase & Co. Internal Use Only

2

2.2 Custom Look and Feel 2.2.1

Description The User Interface of the MyLinks application is displayed in the screenshots below.

2.2.2

Screenshots

Fig. 2 My Links

Fig. 3 Edit My Links page

JP Morgan Chase & Co. Internal Use Only

3

Fig. 4 Add Links to My Links page

Fig. 5 Add Folders page

JP Morgan Chase & Co. Internal Use Only

4

Fig. 6 Organize My Links page

2.3 Diagrams 2.3.1

Class Diagram

Fig. 7 DBUtils.class

JP Morgan Chase & Co. Internal Use Only

5

Fig. 8 JSFileGenerator.class

2.3.2

Sequence Diagrams

Fig. 9 Retrieve the My Links data

JP Morgan Chase & Co. Internal Use Only

6

Fig. 10 Add Link(s)

Fig. 11 Add Folder(s)

Fig. 12 Edit Link(s) or Folder(s)

JP Morgan Chase & Co. Internal Use Only

7

Fig. 13 Organize Link(s)

Fig. 14 Delete Link(s) or Folder(s)

JP Morgan Chase & Co. Internal Use Only

8

Fig. 15 Retrieve JS file for logged-in user

2.3.3

Event Traces

Fig. 16 Event trace of MyLinks application administration The Save changes and the Close actions from addLinks, addFolder, organizeLinks, deleteLink navigates back to the addeditmylinks page. The Close action from the addeditmylinks page closes the window and navigates back to the source URL and refreshes it. JP Morgan Chase & Co. Internal Use Only

9

2.4 Other Considerations 2.4.1

Security There are no security constraints for this component.

2.4.2

Performance/Scalability

2.4.3

Concurrency Not applicable

2.4.4

Persistence and Caching The JS file for a user will be organized in the designated web server doc root by JSFileGenerator.java using the following directory structure depending on the user’s gid:

Fig. 17 JS file organization •

Data is stored in the LINKS and LINK_FOLDERS table of the database. The schema for the tables is as follows LINKS Name

Null

Type

Constraint

ID_LINK

NOT NULL

NUMBER

PK

USER_NAME

NOT NULL

VARCHAR2 (10)

LINK_URL

NOT NULL

VARCHAR2 (256)

LINK_NAME

VARCHAR2 (256)

ID_FOLDER

NUMBER

DT_CREATE

DATE

DT_MODIFIED

DATE

JP Morgan Chase & Co. Internal Use Only

10

Fig. 18 LINKS table schema LINK_FOLDERS Name

Null

Type

USERNAME

NOT NULL

VARCHAR2 (10)

ID_FOLDER

NOT NULL

NUMBER

NM_FOLDER

NOT NULL

VARCHAR2 (100)

DT_CREATE

DATE

DT_MODIFIED

DATE

Constraint PK

Fig. 19 LINK_FOLDERS table schema

2.4.5

Potential for Reuse This utility does not use any custom BEA tags or API classes, except to get the connection from the Connection pool. Therefore, it is encapsulated & can be ported to among J2EE platforms with a small amount of updates.

2.4.6

External Dependencies



This component is dependent on the connection pool being configured in the application server.



The JSFileGenerator component writes the JS file to the shared drive that all web servers can access. Write access for this drive needs to be enabled. The directory used is specified in the application’s custom properties file.



Following JavaScript files must be present in the jslib to call MyLinks functionality.

2.4.7

o

JPM_Loader.js,

o

JPM_Script_NS4.js,

o

JPM_Script_DOM.js,

o

JPM_Script_IE4.js and

o

MyLinks_Globals.js

Communication Not applicable.

2.4.8

Exception Handling • If My Links cannot find the .js for a user, then a default.js is picked up from the web server with • • •

contains the link only. The DB will not read. If there is no write access to the web server directory, exception is logged and should display error message to indicate the same. Read failure with DB, should display error message to indicate the same. Write failure with the DB, should display error message to indicate the same.

JP Morgan Chase & Co. Internal Use Only

11



The request parameters in all the JSPs will be validated using the StringUtils.isWebSafe() method. If a parameter is found to be not web-safe, an error message is logged and the JSP terminates execution. The purpose of this check is to detect SQL injection attacks. The StringUtils class is part of the

com.jpmorganchase.web.ept.utils package. Validation Messages

There is no defined maximum number of folders and /or links that a user can add. No check box is selected on the Edit My links page and Delete is clicked The alert message, ‘You Have Not Selected Any Entries To Be Deleted!’ is displayed to the user No check box is selected on the Edit My links page and Update is clicked The alert message, ‘You Have Not Modified Any Entries!’ is displayed to the user. Nothing is entered in the textboxes on the Add Folders page and Save Changes is clicked The alert message, ‘No Data Has Been Entered!’ is displayed to the user and the focus is set on the first textbox of the page. Duplicate folder names are entered on the Add Folders page An exception message is shown on the page saying, ‘Error Duplicate Entry At Row Previous Entries were Processed!’ Duplicate folders names are entered on the Edit My Links page and Update is clicked An exception message is shown on the Edit My Links page saying, ‘Duplicate error. Folders already exist. Other entries updated.’ is shown on the Add Folders page.

2.4.9

Maintenance/Ease of Support The user folders from the current platform will be migrated manually to the new platform using the same directory structure.

3 Configuration Configuration My Links application does not use a connection pool. It gets the connection from the datasource. The designated web server doc root for the JS files will be picked up from the properties file.

Purpose

Location

4 Cross-Component Impacts Component The Redesigned GCE service

Impact The GCE service should interface with the new MyLinks.

5 Included Components 5.1 Java Classes Component Details: Component Package: Component Name: Purpose:

com.jpmorganchase.web.ept.p13n.mylinks DBUtils class This is a utility java class that has methods for connecting to the

JP Morgan Chase & Co. Internal Use Only

12

database, executing queries and returning results. The methods in the DBUtils.java execute queries, return results as well as filter data before putting it into the database. The results are returned in a 2 dimensional object array. DBUtils does not use a connection pool. It gets the connection from the datasource. Details: convertToObjectArray(HashMap) This method reads the values of the first query into a 2D array of Objects and returns it. executeQuery(String) This method creates a DBQuery Object for a given query and the datasource. executeUpdate(String)

This method updates the query on the connection from the datasource. formatData() This method modifies the parameter so that the single quote (‘) doesn’t result in an insert query failing on the DB server. Component Details: Component Package: Component Name: Purpose:

com.jpmorganchase.web.ept.p13n.mylinks JSFileGenerator class This is a utility java class is used to generate js files for users.

Details: generateUserJS (String , String) Generates JS file for the gid provided. getAllGIDsFromDB() Gets list of all gids for which my links db has data processLinksDataFromDB (List, String) Processes all links for the gid provided processDBList (List , String) Processes all my links for all the gids provided in the gidList processGIDList (List)

Initializes the list to create a list of all gids. createJSFiles(String, String) Creates the JS file containing my links array as provided by a passed string parameter. The gid is also passed as a parameter to this method. createFile(String, String)

This method creates a file given file path and file content. createFileContentString (String, Map, boolean, String) Converts Map of database results to JS array string in js setFileLocation(String) This method parses the given gid and returns js file folder name for the user. parseUserFolderPath(String)

This method creates the user folder path for the given gid. getUserJSFilePath(String)

This method gets the JS file path for the given gid.

Component Details: Component Package:

com.jpmorganchase.web.ept.p13n.mylinks

JP Morgan Chase & Co. Internal Use Only

13

Component Name: Purpose:

MyLinksConstants.class Constants used throughout the My Links application are in this class.

5.2 JSPs Component Details: Component Path: NextGenPortalWeb/WebContent/com/jpmorganchase/web/ept/p13n/mylinks Component Name: addEditMyLinks.jsp Purpose: This file displays all the links in the editable format for the logged-in user. Details: Parameters: Mainly two parameters are passed to process this JSP via an HTTP request: id: This is the valid GID eg. id = U794816 (set in request by the GCE) us: This is the value passed as the source URL from where the MyLinks application opens and is used to redirect the user back to the source from where the My Links application was opened after the Close button is clicked.

Component Details: Component Path: NextGenPortalWeb/WebContent/com/jpmorganchase/web/ept/p13n/mylinks Component Name: addLinks.jsp Purpose: This JSP is the process view that has the UI for adding the links and constructs the corresponding SQL queries. Details: Parameters: Mainly two parameters are passed to process this JSP via an HTTP request: id: This is the valid GID e.g. id = U794816 us: This is the value passed as the source url from where the MyLinks application opens. Component Details: Component Path: NextGenPortalWeb/WebContent/com/jpmorganchase/web/ept/p13n/mylinks Component Name: addFolder.jsp Purpose: This jsp is the process view that has the UI for adding the folders and constructs the corresponding SQL queries. Details: Parameters: Mainly two parameters are passed to process this JSP via an HTTP request: id: This is the valid GID e.g. id = U794816 us: This is the value passed as the source url from where the MyLinks application opens. Component Details: Component Path: NextGenPortalWeb/WebContent/com/jpmorganchase/web/ept/p13n/mylinks Component Name: saveChanges.jsp Purpose: This jsp updates the links for the user i.e. it modifies the links, link names and deletes links. It also constructs the corresponding SQL queries. Details: Parameters: Mainly two parameters are passed to process this JSP via an HTTP request: id: This is the valid GID e.g. id = U794816 us: This is the value passed as the source url from where the MyLinks application opens. JP Morgan Chase & Co. Internal Use Only

14

Component Details: Component Path: NextGenPortalWeb/WebContent/com/jpmorganchase/web/ept/p13n/mylinks Component Name: organizeLinks.jsp Purpose: This jsp has the UI for organizing the links under different folders. It can rearrange the links; move the link under one folder to other. It also constructs the corresponding SQL queries. Details: Parameters: Mainly two parameters are passed to process this JSP via an HTTP request: id: This is the valid GID e.g. id = U794816 us: This is the value passed as the source url from where the MyLinks application opens. Component Details: Component Path: NextGenPortalWeb/WebContent/com/jpmorganchase/web/ept/p13n/mylinks Component Name: deleteLink.jsp Purpose: This process jsp has no display component. This has the logic to construct the SQL queries that delete the selected folder and/or links. This also has a clean up mechanism so that if all the links from a particular folder are deleted, the folder automatically gets deleted. After the delete operations are completed the control is automatically directed to the addeditlinks.jsp. Details: Parameters: Mainly two parameters are passed to process this JSP via an HTTP request: id: This is the valid GID e.g. id = U794816 us: This is the value passed as the source url from where the MyLinks application opens. Component Details: Component Path: NextGenPortalWeb/WebContent/com/jpmorganchase/web/ept/p13n/mylinks Component Name: myLinksArray.jsp Purpose: This is the process jsp generates the JavaScript array. It will expect the URL Parameter for the GID of the user.

JP Morgan Chase & Co. Internal Use Only

15

Details: Parameters: gid: This is the valid GID of the user for whom we want to populate the MyLinks array (eg. gid=U794816) and maintain this parameter throughout the application. url_source: This parameter is the source URL of the page from where the MyLinks application is populated. This parameter is necessary while calling the MyLinks application from outside the portal environment.(eg. url_source=http://--- gce – site URL---). If the parameter value is not present then the MyLinks window is opened from the “mlopenWin ()” function else it opens directly using “window.open ()” of javascript. left_position: This is an optional field only to override the default position. This parameter is the xcoordinate to populate the MyLinks pop-up. This parameter, which is a must for sites outside the portal context, decides where to display the pop-up. If the parameter does not exist then the value is retrieved by the javascript method “getLeftPosition_Communications()”. This method should be present in the rendered html. from_portal: This parameter is mandatory only if the call is from within the portal context. This parameter is mainly to populate the add-edit MyLinks URL that is relative or taken from the properties file. If the parameter from_portal is null, then outside services are accessing the MyLinks application.

5.3 Other Components

6 Unit Test Exit Criteria C:\EPT\Unit Test Cases.doc

7 Open questions Sl. Question No. 1 Where will the independent JSP ) components and java classes be

Entered by Resolution Deepika Mathur

located on the application server?

2 )

How will we copy all of the user folders from the current platform? We could migrate the directory structure from the current platform? Or we could run JSFileGenerator.class once for all the gids.

JP Morgan Chase & Co. Internal Use Only

Deepika Mathur

The My Links library of JSPs and classes will be deployed as part of the Portal application file. The component path has been specified in section 5.1 and 5.2 The user folders from the current platform will be migrated manually to the new platform using the same directory structure (specified in section 2.4.9)

16

JP Morgan Chase & Co. Internal Use Only

17

Related Documents

My Document
May 2020 10
My Document
October 2019 8
V08.docx
April 2020 2
Links
November 2019 36