-
Notifications
You must be signed in to change notification settings - Fork 0
Sequence Diagrams
Süleyman Emir Taşan edited this page Apr 30, 2024
·
32 revisions
sequenceDiagram
actor R as Registered User
alt follow
R->>+ Profile: followUser(user)
Profile->>+ Database: insert_user_follow(registered_user, user)
alt insertion is successful
Database-->>Profile: success
Profile-->>R: success
else
Database-->>-Profile: failure
Profile-->>-R: failure
end
else unfollow
R->>+ Profile: unfollowUser(user)
Profile->>+ Database: delete_user_follow(registered_user, user)
alt deletion is successful
Database-->>Profile: success
Profile-->>R: success
else
Database-->>-Profile: failure
Profile-->>-R: failure
end
end
sequenceDiagram
actor R as Registered User
R->>+ Post: createPost(post)
Post->>+ Database: create_post(registered_user, post)
alt insertion is successful
Database-->>Post: success
Post-->>R: success
else
Database-->>-Post: failure
Post-->>-R: failure
end
sequenceDiagram
actor R as User
create participant Filter
R->> Filter: initiate(Map<K,V>)
destroy Filter
Filter-->> R: filter:Filter
R->>+ SearchEngine: searchSongs(filter: Filter)
SearchEngine->>+ Database: get_appropriate_songs(Map<K, V>)
alt searching is successful
Database-->>SearchEngine: List<Song>
SearchEngine-->>R: List<Song>
else searching is not successful
Database-->>-SearchEngine: noSongFound
SearchEngine-->>-R: noSongFound
end
sequenceDiagram
actor R as User
create participant Filter
R->> Filter: initiate(Map<K,V>)
destroy Filter
Filter-->> R: filter:Filter
R->>+ SearchEngine: searchUsers(filter: Filter)
SearchEngine->>+ Database: get_appropriate_user_profiles(Map<K, V>)
alt searching is successful
Database-->>SearchEngine: List<Profile>
SearchEngine-->>R: List<Profile>
else searching is not successful
Database-->>-SearchEngine: noProfileFound
SearchEngine-->>-R: noProfileFound
end
sequenceDiagram
actor User
participant Profile
participant Database
User->>+Profile: setBio(bio: String)
Profile->>+Database: update_bio(String)
alt update is successful
Database-->>Profile: success
Profile-->>User: true
else
Database-->>-Profile: failure
Profile-->>-User: false
end
sequenceDiagram
actor User
participant UserController
participant Database
User->>+UserController: login(username: String, password: String)
UserController->>+Database: check_credentials(username: String, password: String)
alt credentials are valid
Database-->>UserController: success
UserController-->>User: Logged in successfully
else
Database-->>-UserController: failure (Invalid credentials)
UserController-->>-User: Login failed: Invalid username or password
end
sequenceDiagram
actor GuestUser
participant UserController
participant Database
GuestUser->>+UserController: register(Map<K, V>)
UserController->>+Database: add_user(Map<K, V>)
alt No existing user with same username
Database-->>UserController: success
UserController-->>GuestUser: Registered successfully
else
Database-->>-UserController: failure (User exists)
UserController-->>-GuestUser: Registration failed: Username already exists
end
sequenceDiagram
actor R as User
create participant SwitchToFeed
R->> SwitchToFeed: switch to the FeedPage
destroy SwitchToFeed
SwitchToFeed-->> R: switch:FeedPage
R->>+ FeedPage: loadFeed(switch: SwitchToFeed)
FeedPage->>+ Database: get_recommended_posts(user_id)
alt Success
Database-->>FeedPage: List<Posts>
FeedPage-->>R: listPosts(post_ids, sorting_criteria)
else Failure
Database-->>-FeedPage: <ERR_CODE>
FeedPage-->>-R: displayError(ERR_CODE, 'Post could not be found')
end
sequenceDiagram
actor R as User
R->>+FeedPage: likePost(post_id)
FeedPage->>+ Database: addLikedUser(user: User)
alt Success
Database-->>FeedPage: <Liked the Post>
FeedPage-->>R: Post has been liked
else Failure
Database-->>-FeedPage: <ERR_CODE>
FeedPage-->>-R: displayError(ERR_CODE, 'Post could not be liked')
end
sequenceDiagram
actor R as User
create participant CreateAComment
R->> CreateAComment: write a Comment
destroy CreateAComment
CreateAComment-->> R: switch:FeedPage
R->>+FeedPage: commentToAPost(post_id, comment)
FeedPage->>+ Database: addComment(comment: Comment)
alt Success
Database-->>FeedPage: <Comment added to Post>
FeedPage-->>R: Comment has been added to Post
else Failure
Database-->>-FeedPage: <ERR_CODE>
FeedPage-->>-R: displayError(ERR_CODE, 'Comment could not be added')
end
sequenceDiagram
actor R as Registered User
R->>+ Profile: getSearchHistory()
Profile ->>+ Database: getSearchHistory(username: string)
alt search history found
Database-->> Profile: search_history
Profile --> R : search_history
else
Database-->>- Profile: failure
Profile-->>- R: failure
end
sequenceDiagram
actor R as User
alt Logged in
R->> Database: getProfilePicture()
Database-->> R: String
create participant SwitchToFeed
R->> SwitchToFeed: switch to the FeedPage
destroy SwitchToFeed
SwitchToFeed-->> R: switch:FeedPage
R->>+ FeedPage: loadFeed(switch: SwitchToFeed)
FeedPage->>+ Database: get_recommended_posts(user_id)
alt Success
Database-->>FeedPage: List<Posts>
FeedPage-->>R: listPosts(post_ids, sorting_criteria)
else Failure
Database-->>-FeedPage: <ERR_CODE>
FeedPage-->>-R: displayError(ERR_CODE, 'Post could not be found')
end
else Not logged in
R->>+ LoginPage: Go to login page
LoginPage -->>R: switch:LoginPage
end
sequenceDiagram
actor R as User
create participant Filter
R->> Filter: initiate(Map<K,V>)
destroy Filter
Filter-->> R: filter:Filter
R->>+ SearchEngine: searchPosts(filter: Filter)
SearchEngine->>+ Database: get_appropriate_Posts(Map<K, V>)
alt searching is successful
Database-->>SearchEngine: List<Post>
SearchEngine-->>R: List<Post>
else searching is not successful
Database-->>-SearchEngine: noPostFound
SearchEngine-->>-R: noPostFound
end
sequenceDiagram
actor R as User
create participant Filter
R->> Filter: initiate(Map<K,V>)
destroy Filter
Filter-->> R: filter:Filter
R->>+ SearchEngine: searchEvents(filter: Filter)
SearchEngine->>+ Database: get_appropriate_Events(Map<K, V>)
alt searching is successful
Database-->>SearchEngine: List<Event>
SearchEngine-->>R: List<Event>
else searching is not successful
Database-->>-SearchEngine: noEventFound
SearchEngine-->>-R: noEventFound
end
Deniz, Ebrar, Ramazan, Semih, Süleyman, Utku, Arınç, Abdullah Umut, Güney
🏠 Home
- Software Requirements
- RAM
- Sequence Diagram
- Class Diagram
- Use-Case Diagram
- Mockups
- User Scenario 1 - Quiz generation
- User Scenario 2 ‐ Find quiz from the forum
- User Scenario 3 ‐ Ask Question in the Forum
- User Scenario 4 - Solve a Quiz Sent by Another User
- Lab Report #1 | 24.09.2024
- Lab Report #2 | 01.10.2024
- Lab Report #3 | 08.10.2024
- Lab Report #4 | 15.10.2024
- Lab Report #5 | 05.11.2024
Lab Meeting Notes
Team Meeting Notes
🧑🏻💻 About Us
🗂️ Templates
CmpE 352
- Customer Milestone 1 Report
- Customer Milestone 2 Report
- Customer Milestone 3 Report
- UML Use-Case Diagram
- UML Class Diagram
- Sequence Diagrams
- API Documentation
- RAM | Responsibility Assignment Matrix
🗃️ All Project Files
📝 352 Meeting Notes
- Meeting #11 | 11.05.2024
- Frontend Meeting Notes #2 | 07.05.2024
- Meeting #10 | 07.05.2024
- Frontend Meeting Notes #1 | 08.04.2024
- Backend Meeting Notes
- Mobile Team Meeting Notes
- Meeting #9 | 28.04.2024
- Meeting #8 | 22.04.2024
- Meeting #7 | 04.04.2024
- Meeting #6 | 27.03.2024
- Meeting #5 | 15.03.2024
- Customer Meeting #1 | 15.03.2024
- Meeting #4 | 07.03.2024
- Meeting #3 | 03.03.2024
- Meeting #2 | 26.02.2024
- Meeting #1 | 19.02.2024