-
Notifications
You must be signed in to change notification settings - Fork 1
Sequence Diagrams
Mücahit Erdoğan Ünlü edited this page Oct 12, 2024
·
26 revisions
sequenceDiagram
participant RegisteredUser
participant SearchEngine
participant WikiData
participant ContentController
participant Database
Activate RegisteredUser
RegisteredUser ->> SearchEngine : search keyword, createFilter()
Activate SearchEngine
SearchEngine ->> WikiData : query(keyword)
Activate WikiData
WikiData -->> SearchEngine : return List<WikiData_Entity>
Deactivate WikiData
SearchEngine ->> RegisteredUser : ask for WikiData_Entity selection
RegisteredUser -->> SearchEngine : selected WikiData_Entity
SearchEngine ->> WikiData : get_keywords(WikiData_Entity)
Activate WikiData
WikiData ->> SearchEngine : return new_keyword_list<keyword>
Deactivate WikiData
SearchEngine ->> ContentController : find(new_keyword_list)
Activate ContentController
ContentController->> Database: get matching content
Activate Database
Database -->> ContentController : return List<Post>
Deactivate Database
ContentController -->> SearchEngine : return List<Post>
Deactivate ContentController
SearchEngine ->> RegisteredUser : filter(post_list, filter)
Deactivate SearchEngine
Deactivate RegisteredUser
sequenceDiagram
Registered User->>ContentController: getPost(post)
ContentController->>+Database: retrieve post from database
Database-->>ContentController: post
alt success
ContentController->>Wikidata: getInfoBox(qid: String)
Wikidata-->>ContentController: success
ContentController-->>Registered User: success
else failure
Database-->>-ContentController: failure
ContentController-->>Registered User: failure
end
sequenceDiagram
Registered User->>+ContentController: getPost(post_id)
ContentController->>+ Database: get post
Activate Registered User
alt saving is successful
Database-->>ContentController: Post
ContentController-->>Registered User: Post
Registered User->>ContentController: bookmarkPost(post)
ContentController->>+ Database: save bookmark action into database
Database-->>ContentController: success
ContentController-->>Registered User: success
else failure
Database-->>-ContentController: failure
ContentController-->>-Registered User: failure
end
Deactivate Registered User
sequenceDiagram
Registered User->>+ UserController: getUser(username)
Activate Registered User
UserController->>+ Database: get user profile
alt user blocking is successful
Database-->>UserController: profile
UserController -->> Registered User: profile
Registered User->> UserController: blockUser(username)
UserController->> Database: save the block action
Database-->>UserController: success
UserController -->> Registered User: success
else failure
Database-->>-UserController: failure
UserController-->>-Registered User: failure
end
Deactivate Registered User
sequenceDiagram
Registered User->>+ UserController: login(username: String, password: String)
Activate Registered User
UserController->>+ Database: verify credentials
alt reset password is successful
Database-->>UserController: success
UserController -->> Registered User: success
Registered User->> UserController: update(password)
UserController->> Database: save the reset action
Database-->>UserController: success
UserController -->> Registered User: success
else failure
Database-->>-UserController: failure
UserController-->>-Registered User: failure
end
Deactivate Registered User
sequenceDiagram
Registered User->>+ContentController: getPost(post_id)
ContentController->>+ Database: get post
Activate Registered User
alt saving is successful
Database-->>ContentController: Post
ContentController-->>Registered User: Post
Registered User->>ContentController: likePost(post)
ContentController->>+ Database: save like action into database
Database-->>ContentController: success
ContentController-->>Registered User: success
else failure
Database-->>-ContentController: failure
ContentController-->>-Registered User: failure
end
Deactivate Registered User
sequenceDiagram
Registered User->>+ ProfileController: getProfile(username)
ProfileController->>+ Database: get profile
Activate Registered User
alt user followed successfully
Database-->>ProfileController: Profile
ProfileController -->> Registered User: Profile
Registered User->> ProfileController: followUser(profile)
ProfileController->>+ Database: save the follow action
Database-->>ProfileController: success
ProfileController -->> Registered User: success
else failure
Database-->>-ProfileController: failure
ProfileController-->>-Registered User: failure
end
Deactivate Registered User
sequenceDiagram
Registered User->>+Feed: populateFeed()
Feed->>+ Database: get posts
Activate Registered User
alt saving is successful
Database-->>Feed: Post list
Feed-->>Registered User: Post list
Registered User->>+Feed: create(text: String, author: RegisteredUser, title: String, image: Image)
Feed->>+ Database: save create action into database
Database-->>Feed: success
Feed-->>Registered User: success
else failure
Database-->>-Feed: failure
Feed-->>-Registered User: failure
end
Deactivate Registered User
sequenceDiagram
Registered User->>+ ProfileController: getProfile(username)
ProfileController->>+ Database: get profile
Activate Registered User
alt profile updated successfully
Database-->>ProfileController: Profile
ProfileController -->> Registered User: Profile
Registered User->> ProfileController: update(profile)
ProfileController->>+ Database: save the new profile action
Database-->>ProfileController: success
ProfileController -->> Registered User: success
else failure
Database-->>-ProfileController: failure
ProfileController-->>-Registered User: failure
end
Deactivate Registered User
Turquiz App
DONE
- Lab Report #1
- Lab Report #2
- Lab Report #3
- Lab Report #4
- Lab Report #5
- Lab Report #6
- Lab Report #7
- Lab Report for Lab 9
- Lab Meeting #1
- Meeting #1
- Lab Meeting #2
- Meeting #2
- Project Plan Meeting
- Frontend Meeting #1
- Lab Meeting #3
- Meeting #3
- Meeting #4
- Lab Meeting #4
- Meeting #5
- Meeting #6
- Meeting #7
- Meeting #8
- User Scenario 1 - Explore and Register
- User Scenario 2 - Search for a Quiz & Create a Quiz
- User Scenario 3 - Take & Review a Quiz
- User Scenario 4 - Search Forum & Bookmark & Upvote & Answer
- User Scenario 5 - User Badges
- User Scenario Template
- User Stories