Report Week345

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

HANOI UNIVERSITY OF SCIENCE AND TECHNOLOGY

SCHOOL OF INFORMATION AND COMMUNICATION TECHNOLOGY


-----oo0oo-----

GRADUATION THESIS
Developing a files and directories system

Student: Student Id: Class: Course:


Nguyễn Nam Anh 20176002 LTU16A K62

Advisor: PhD. Đỗ Quốc Huy

Hanoi, 04 – 2022
Table of Contents
I. GENERAL INTRODUCTION .................................................................................................................. 3
II. ANALYZING THE SYSTEM ................................................................................................................... 3
2.1. USE CASES OVERVIEW ................................................................................................................................. 3
2.1.1. Operating with file Use cases ........................................................................................................... 4
2.1.2. Operating with directory Use cases ................................................................................................. 4
2.2. USE CASES SPECIFICATION ............................................................................................................................ 4
2.2.1. Guest use cases ................................................................................................................................ 5
2.2.1.1. Login........................................................................................................................................................ 5
2.2.1.2. Register ................................................................................................................................................... 5
2.2.1.3. Forgot Password ..................................................................................................................................... 6
2.2.2. User use cases .................................................................................................................................. 7
2.2.2.1. Log out .................................................................................................................................................... 7
2.2.2.2. Search ..................................................................................................................................................... 7
2.2.2.3. Update information ................................................................................................................................ 8
2.2.2.4. Use case Change Password..................................................................................................................... 9
2.2.2.5. Use case Upload ..................................................................................................................................... 9
2.2.2.6. Use case Download............................................................................................................................... 10
2.2.2.7. Use case Preview .................................................................................................................................. 11
2.2.2.8. Use case Set Permission permissions ................................................................................................... 11
2.2.2.9. Use case Share ...................................................................................................................................... 11
2.2.2.10. Use case Delete File .............................................................................................................................. 12
2.2.2.11. Use case Watch List File........................................................................................................................ 12
2.2.2.12. Use case Create .................................................................................................................................... 13
2.2.2.13. Use case Delete .................................................................................................................................... 14
2.3. FLOWS OF SYSTEM ...................................................................................................................................14
2.3.1. Login ...............................................................................................................................................14
2.3.2. Register...........................................................................................................................................15
2.3.3. Forgot password.............................................................................................................................15
2.3.4. Search .............................................................................................................................................15
2.3.5. Change Information .......................................................................................................................16
2.3.6. Change password ...........................................................................................................................16
2.3.7. Upload ............................................................................................................................................17
2.3.8. Download .......................................................................................................................................17
2.3.9. Preview ...........................................................................................................................................17
2.3.10. Set permission ...........................................................................................................................18
2.3.11. Share..........................................................................................................................................18
2.3.12. Delete File ..................................................................................................................................19
2.3.13. Watch List File ...........................................................................................................................19
2.3.14. Create Directory ........................................................................................................................19
2.3.15. Delete Directory .........................................................................................................................20
III. DESIGNING THE SYSTEM .................................................................................................................. 21
3.1. DATABASE ..............................................................................................................................................21
3.2. CLASS AND PACKAGE DIAGRAM ...................................................................................................................22
3.3. SYSTEM STRUCTURE..................................................................................................................................24
I. General introduction
II. Analyzing the system
2.1. Use cases overview

When not logged in, guests can register for a new account, log in, or request a password reset
when they forget their password, and reset their password when they receive setup instructions
via email. When the guest successfully logs in, the software displays a menu containing the
corresponding functions. When the guest requests to reset the password, the software generates
the token and sends the password reset instructions via email.
After logging in, the user can perform operations with their files and directory given by the
system, such as uploading files, creating directories and updating personal information, and
changing the password.
2.1.1. Operating with file Use cases

2.1.2. Operating with directory Use cases

2.2. Use cases specification


The details of the use case are going to be described in this section.
2.2.1. Guest use cases
2.2.1.1. Login
Name Login
Purpose Login allow a Guest becoming a User
Actor Guest
Pre- Actor already have an account and not be locked
condition
Post- Guest becomes User
condition
Main flow 1. Actor accesses Login.
2. The system shows up Login page.
3. Actor fills in the fields:
3.1. Actor fills in the wrong account or password, move to branch
flow 3.1.
3.2. Any required field is missed, move to branch flow 3.2
3.3. Account is locked, move to branch flow 3.3
4. Login is success, Actor will be directed to User pages.
Sub-flow No
Branch flow - Flow 3.1: System notifies account not exist. Ask actor to re-fill the
fields.
- Flow 3.2: System notifies not filled fields, Ask for re-filling the fields.
- Flow 3.3: System notifies that account is locked.

• Fields in Login:
Name Description Required Eligibility conditions Example
Username User account Yes Accept letters, numbers, Longnh123
longer than 0 and shorter
than 255 characters.
Password Password Yes Accept letters, numbers, 123456
longer than 0 and shorter
than 255 characters.

2.2.1.2. Register
Name Register
Purpose Allowing a Guest creating an account to become a User
Actor Guest
Pre- No
condition
Post- Guest owns a account and can use that account to login the system
condition
Main flow 1. Actor accesses Register page.
2. The system shows up Register pages.
3. The actor fills in the fields:
3.1. If one or many required fields are missed, move to Flow 3.1.
3.2. Username is duplicated, move to Flow 3.2
3.3. Password is not strong enough, move to Flow 3.3
3.4. Email is not valid, move to Flow 3.4
3.5.Actor chooses “Cancel”, move to Flow 3.5
4. System saves the information and notifies success. Actor is directed
to the Login pages.
Sub-flow No
Branch flow - Flow 3.1: System notifies required fields not filled. Ask the actor to
fill the fields.
- Flow 3.2: System notifies username is duplicated, Ask the actor to
enter a new username.
- Flow 3.3: System notifies Password is not strong enough, notifies a
strong password condition. Ask for a new password.
- Flow 3.4: System notifies email Is invalid, Ask for re-filling the field.
- Flow 3.5: System directs the actor to the Login page.

• Fields in Register:
Name Description Required Eligibility conditions Example
Username Username Yes Accept letters, Longnh123
numbers, longer than 0
and shorter than 255
characters.
Password Password Yes Longer than 0, shorter L@123456
than 255 characters.
Include letters, numbers
or special characters.
Email Email used to Yes In form xxx@xxx.xxx longnh@gmail.com
contact with the
actor
Name Actor Name Yes Include letters and Nguyễn Hoàng
spaces. Longer than 0, Long
shorter than 255
characters.
Birthday Actor birthday No In form DD / MM / 20/8/1999
YYYY,
A date exists in real life.
Phone Phone number Yes The length is 10 0123456789
number used to contact
with the actor

2.2.1.3. Forgot Password


Name Forgot Password
Purpose Change password when user forgets password.
Actor Guest
Pre- Guest owns an account and forgets password
condition
Post- Guest can login the system with a new password provided via a email
condition
Main flow 1. Actor chooses Forgot Password.
2. System shows up Reset Password page.
3. Actor fills in the email field and chooses “Submit”.
- Email is invalid, move to Flow 3.1
- Actor chooses “Cancel”, move to Flow 3.2.
4. System checks email.
- Email does not exist, move to Flow 4.1
5. System sends a new password to entered email.
- System sends failed, move to Flow 5.1.

Sub-flow No
Branch flow - 3.1. System notifies email invalid, Ask Actor re-filling the fields.
- 3.2. System directs the actor to the login page.
- 4.1. System notifies email does not exist.
- 5.1. System notifies errors and directs to Forgot Password page.

• Used fields
Name Description Required Eligibility conditions Example
Email Email used to Yes In form xxx@xxx.xxx longnh@gmail.com
contact with
Actor

2.2.2. User use cases


2.2.2.1. Log out
Name Logout
Purpose Logout user
Actor User
Pre- Actor is logged in the system
condition
Post- No
condition
Main flow 1. Actor chooses Logout
2. System shows a pop-up “Do you want to log out?”
3. Actor chooses Yes
- Actor chooses No, move to Flow 3.1
4. System directs actor to Guest pages
Sub-flow No
Branch flow - 3.1 System closes pop-up.

2.2.2.2. Search
Name Search
Purpose Search directories or files
Actor User
Pre- Actor is logged in the system
condition
Post- Files/ directories are shown up in Search. Actor can open directories or
condition preview the files from search.
Main flow 1. Actor fills in the files or directories name in Search input and chooses
the search icon.
- Actor click outside the search input, move to Flow 1.1
2. System shows up files or directories available in the actor repository.
- System does not find any result , move to Flow 2.1
Sub-flow No
Branch flow - 1.1 System directs actor to the previous page.
- 2.1 System shows up notifies “Not found any result”.

• Used fileds
Name Description Required Eligibility conditions Example
keyword Keywords in files or Yes Longer than 0, shorter than Lib
directories 255 characters.

2.2.2.3. Update information


Name Update information
Purpose Update user information.
Actor User
Pre- User is logged in the system.
condition
Post- Account information is updated successfully
condition
Main flow 1. Actor chooses Update information
2. System shows up update information pages.
3. Actor fills in the fields.
4. System checks and shows pop-up “Do you want to change the
information?”
- If one or many required fields are missed, move to Flow 4.1
- If one or many required fields are invalid , move to Flow 4.2
5. Actor chooses “Submit”
- Actor chooses “Cancel” , move to Flow 5.1
6. System updates the information, and notifies updating successfully.
Sub-flow No
Branch flow - 4.1 System shows up notifies “Missing information” and Ask fills in
the missing fields.
- 4.2 System shows up notifies “Invalid form” and Ask re-filling the
invalid fields.
- 5.1 Back to Main Flow 2.
• Used fileds
Name Description Required Eligibility conditions Example
Email Email used to No In form xxx@xxx.xxx longnh@gmail.com
contact with
Actor
Name Actor name No Include letters and Nguyễn Hoàng
spaces, Longer than 0, Long
shorter than 255
characters.
Birthday Actor birthday No In form DD / MM / 20/8/1999
YYYY,
A date exists in real life.
Phone Phone number No The length is 10 0123456789
number used to contact
with Actor
2.2.2.4. Use case Change Password
Name Change password
Purpose Change Password current password.
Actor User
Pre- User is logged in the system.
condition
Post- Password is changed successfully.
condition
Main flow 1. Actor chooses Change Password
2. System shows up Change Password pop-up includes the fields
described below.
3. Actor fills in fields.
4. System checks fields.
- New password is too weak, move to Flow 4.1
- New password and confirmed password do not match , move to Flow
4.2
5. Actor chooses “Submit” Change Password
- 5.1. Actor chooses “Cancel” , move to Flow 5.1
6. System checks and update password and shows up notifies “Change
Password successfully”.
- Actor fills in old password wrong, move to Flow 6.1
Sub-flow No
Branch flow - 4.1 System shows up notifies “Password is not strong enough” and
Ask re-filling the fields new password.
- 4.2 System shows up notifies “Password and Confirmed password do
not match” and Ask Actor re-filling the fields.
- 5.1 System directs actor to the previous page.
- 6.1 System notifies old password is not correct, backs to Main Flow
2.

• Used fileds
Name Description Required Eligibility conditions Example
Old Current Password Yes Accept letters, and 123456
password numbers, longer than 0 and
shorter than 255 characters.
Password must be the same
current Password.
New New Password Yes Accept letters, numbers, 123456
password longer than 0 and shorter
than 255 characters.
Confirmed Confirmed password Yes Accept letters, and 123456
Password numbers, longer than 0 and
shorter than 255 characters.
Match the new password.

2.2.2.5. Use case Upload


Name Upload
Purpose Upload file to repository.
Actor User
Pre- User is logged in the system.
condition
Post- File is uploaded successfully.
condition
Main flow 1. Actor chooses Upload
2. System shows up Upload file page.
3. Actor chooses the file needed to upload.
- File is in forbidden form, move to Flow 3.1
- File name is duplicated, move to Flow 3.2
- File size is too large, move to Flow 3.3
- Actor chooses “Cancel”, move to Flow 3.4
4. System uploads the file , and shows up the upload progress.
- Upload file is failed, move to Flow 4.1.
5. System shows up notifies “Upload successfully” and updates
repository.
Sub-flow No
Branch flow - 3.1. System notifies “Invalid file extension”, and rejects uploading file
to system.
- 3.2 System notifies “Duplicated Name”, and rejects uploading file.
- 3.3 System notifies “File size is too large”, and rejects upload file.
- 3.4 System directs actor to the previous page.
- 4.1. System notifies errors and backs Main Flow 2.

2.2.2.6. Use case Download


Name Download
Purpose Download file form repository User to local machine.
Actor User
Pre- User is logged in the system.
condition
Post- File is downloaded successfully.
condition
Main flow 1. Actor chooses the file needed to download and chooses Download.
2. System checks file
- File does not exist, move to Flow 2.1
- Actor does not have permission to download the file, move to Flow
2.2
- File name is duplicated with another file that existed in the local
machine download directory, move to Flow 2.3
3. System downloads file and shows up download progress.
- Download failed, move to Flow 3.1.
- Actor chooses Cancel, move to Flow 3.2.
4. System notifies download successfully.
Sub-flow No
Branch flow - 2.1 System shows up a pop-up “Current file does not exist”.
- 2.2 System shows up a pop-up “Do not have permission to download
file”.
- 2.3. System adds the mark to the end of the file name.
- 3.1 System directs actor to the previous page.
- 3.2. System shows up a pop-up “Do you want to stop downloading
the file?”. The user chooses Yes, System moves to Flow 3.1 or
chooses No, System closes the pop-up and continues the download
progress.

2.2.2.7. Use case Preview


Name Preview
Purpose Preview file in repository.
Actor User
Pre- User is logged in the system.
condition
Post- File is opened preview mode.
condition
Main flow 1. Actor chooses file.
2. System shows up preview.
- 2.1. File is not exist , move to Flow 2.1
Sub-flow No
Branch flow - 2.1 System shows up pop-up “File hiện tại not exist”.
• Các định dạng file được hỗ trợ:
Extension Previews
Documents 20 first pages
PDF 20 first pages
Image Image
Video Video player
Audio Audio player.
Other Icon, name, size, date added

2.2.2.8. Use case Set Permission permissions


Name Description
View User is set permissions can View Files or directories.
View and download. User is set permission can View and download Files or directories.
Edit User is set permissions can View and delete Files or directories and
upload file directories.

2.2.2.9. Use case Share


Name Share
Purpose Create URL to share Files or directories for the other user access.
Actor User
Pre- User is logged in the system.
condition
Post- URL to share Files or directories is created successfully.
condition
Main flow 1. Actor chooses Files or directories and chooses Share.
2. System shows up Share.
- Files or directories are not exist, move to Flow 2.1.
- Files or directories do not belong to Actor, move to Flow 2.2
3. Actor choose:
- Choose “Share to individual or group”, move to Sub-flow 3a.
- Choose “Share to all”, move to Sub-flow 3b.
- Choose “Cancel”, move to Flow 3.1
Sub-flow - 3a. Actor chooses “Share to individual or group”
+ 3a.1 Actor fills in user needed to share.
• Actor fills in email do not available in the register list, move to 3.2.
+ Actor continues performing Use case “Set Permission” with Sub-flow 3a.
- 3b. Actor chooses “Share to all”.
+ Actor continues performing Use case “Set Permission” with Sub-flow 3b.

Branch flow - 2.1 System shows up pop-up “File or directories do not exist”.
- 2.2 System shows up pop-up “File or directories do not belong to
you”.
- 3.1. System directs the actor to the previous page.
- 3.2. System notifies email does not exist and does bot set permissions
to that email.

• Used fileds
Name Description Required Eligibility conditions Example
Email Email used to No In form xxx@xxx.xxx longnh@gmail.com
contact with
Actor

2.2.2.10. Use case Delete File


Name Delete File
Purpose Delete file from repository.
Actor User
Pre- User is logged in the system.
condition
Post- File delete successfully.
condition
Main flow 1. Actor chooses directories needed to delete and chooses Delete.
2. System shows up a pop-up “Do you want to delete this file? This
action can not be reverted”.
- File does not exist, move to Flow 2.1
- File does not belong to Actor, move to Flow 2.2
3. User chooses “Submit”.
- User choose “Cancel”, move to Flow 3.1
4. System updates and shows up notifies file is deleted.
Sub-flow No
Branch flow - 2.1 System shows up pop-up “File is not exist” and refreshes the page.
- 2.2 System shows up pop-up “File does not belonged to you”.
- 3.1 System directs actor to the previous page.

2.2.2.11. Use case Watch List File


Name Watch List File
Purpose View list of files available in directories.
Actor User
Pre- User is logged in the system.
condition
Post- List file in directories is shown up.
condition
Main flow 1. Actor chooses directories needed to View.
2. System shows up a list of files available in directories.
- 2.1. Directory does not exist , move to Flow 2.1
- 2.2. Directory does not belonged to Actor, move to Flow 2.2

Sub-flow No
Branch flow - 1.1 System shows up pop-up “Directory hiện tại not exist”.
- 1.2 System shows up pop-up “Directory does not belonged to you”.

• Used fileds
Name Description Example
Name File name New Dir 1
Type File extension doc
Size File size 17 KB
Time The day that file is 8:00 13/4/2020
Added upload

2.2.2.12. Use case Create


Name Create
Purpose Create directories.
Actor User
Pre- User is logged in the system.
condition
Post- Directory is created successfully.
condition
Main flow 1. Actor chooses “Create a new directory”.
2. System shows up Create directories.
3. Actor fills in the directory name and chooses “Submit”
- Actor chooses “Cancel”, move to Flow 3.1
4. System checks Directory name.
- 4.1 Directory name is too long, move to Flow 4.1
- 4.2 Directory name is duplicated directories is existed in the
repository , move to Flow 4.2
5. System shows up notifies “Directory is created”.
Sub-flow No
Branch flow - 3.1 System directs actor to the previous page.
- 4.1 System notifies “Directory name is too long” and Ask Actor re-
filling the fields.
- 4.2 System notifies “Directory name is duplicated” and Ask Actor re-
filling the fields.

• Trường dữ liệu đầu vào


Name Description Required Eligibility conditions Example
name Directory name Yes Longer than 0, shorter than New Dir 1
255 characters.
2.2.2.13. Use case Delete
Name Delete
Purpose Delete directories.
Actor User
Pre- User is logged in the system.
condition
Post- Directory is deleted successfully.
condition
Main flow 1. Actor chooses directories needed to delete and chooses “Delete”.
- directories do not exist, move to Flow 1.1
- directories Does not belonged to Actor , move to Flow 1.2
2. System shows up pop-up “Do you want to delete directories trên? All
the data stored in directories will be delete permanently and can not
be reverted”.
3. Actor chooses “Submit”.
- Actor chooses “Cancel”, move to Flow 3.1
4. System updates and shows up notifies directories is deleted.
Sub-flow No
Branch flow - 1.1 System shows up pop-up “Directory does not exist”.
- 1.2 System shows up pop-up “Directory does not belonged to you”.
- 3.1 System directs actor to the previous page.

2.3. Flows of System


This section of the thesis will specify the flow of the system by sequence diagrams, each
diagram represents the main flow of the aforementioned use cases.

2.3.1. Login
2.3.2. Register

2.3.3. Forgot password

2.3.4. Search
2.3.5. Change Information

2.3.6. Change password


2.3.7. Upload

2.3.8. Download

2.3.9. Preview
2.3.10. Set permission

2.3.11. Share
2.3.12. Delete File

2.3.13. Watch List File

2.3.14. Create Directory


2.3.15. Delete Directory
III. Designing the system
3.1. Database
3.2. Class and package diagram
3.3. System structure

You might also like