-
Notifications
You must be signed in to change notification settings - Fork 1
Sequence Diagrams
Oğuz Kağnıcı edited this page Dec 20, 2024
·
8 revisions
sequenceDiagram
actor User
participant PostController
participant Database
User->>PostController: createPost(title, content, category, challenged_post)
PostController->>Database: savePost(user_id, title, content, category, challenged_post)
alt Success
Database-->>PostController: <OK>
PostController-->>User: Post created successfully.
else Failure
Database-->>PostController: <ERROR>
PostController-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant PostController
participant Database
User ->>PostController: deletePost(post_id)
PostController->>Database: deletePost(post_id)
alt Success
Database-->>PostController: <OK>
PostController-->>User: Post deleted successfully.
else Failure
Database-->>PostController: <ERROR>
PostController-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant PostController
participant Database
User ->>PostController: viewPost(post_id)
PostController->>Database: getPostDetails(post_id)
alt Success
Database-->>PostController: <OK, content, post_type, comments>
alt Text-Only Post
PostController-->>User: displayContent(content)
PostController-->>User: displayComments(comments)
else Visual Post
PostController-->>User: displayContent(content)
PostController-->>User: displayComments(comments)
PostController-->>User: display3DModelViewer(model_file)
end
else Failure
Database-->>PostController: <ERROR>
PostController-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant PostController
participant Database
User ->>PostController: likePost(post_id, value)
PostController->>Database: likePost(user_id, post_id, value)
alt Success
Database-->>PostController: <OK, post_likes>
PostController-->>User: displayPostLikes(post_id)
else Failure
Database-->>PostController: <ERROR>
PostController-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant PostController
participant Database
User ->>PostController: bookmarkPost(post_id)
PostController->>Database: bookmarkPost(user_id, post_id)
alt Success
Database-->>PostController: <OK>
PostController-->>User: Bookmark added successfully.
else Failure
Database-->>PostController: <ERROR>
PostController-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant PostController
participant Database
User->>PostController: createComment(post_id, content)
PostController->>Database: saveComment(user_id, post_id, content)
alt Success
Database-->>PostController: <OK>
PostController-->>User: Comment created successfully.
else Failure
Database-->>PostController: <ERROR>
PostController-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant CommentController
participant Database
User->>CommentController: deleteComment(post_id, comment_id)
CommentController->>Database: deleteComment(post_id, comment_id)
alt Success
Database-->>CommentController: <OK>
CommentController-->>User: Comment deleted successfully.
else Failure
Database-->>CommentController: <ERROR>
CommentController-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant CommentController
participant Database
User ->>CommentController: likeComment(post_id, comment_id, value)
CommentController->>Database: likeComment(user_id, post_id, comment_id, value)
alt Success
Database-->>CommentController: <OK, comment_likes>
CommentController-->>User: displayCommentLikes(post_id, comment_id)
else Failure
Database-->>CommentController: <ERROR>
CommentController-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant PostController
participant FeedController
participant Database
User ->>PostController: viewFollowing(user_id)
PostController->>FeedController: fetchFollowing(user_id)
FeedController->>Database: fetchFollowing(user_id)
alt Success
Database-->>FeedController: <OK, following>
FeedController-->>PostController: <following>
PostController-->>User: displayFollowingFeed(following)
else Failure
Database-->>FeedController: <ERROR>
FeedController-->>PostController: <ERR_CODE>
PostController-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant CategoryController
participant Database
User ->>CategoryController: follow(category)
CategoryController->>Database: follow(user_id,category)
alt Success
Database-->>CategoryController: <OK>
CategoryController-->>User: Followed category successfully.
else Failure
Database-->>CategoryController: <ERROR>
CategoryController-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant CategoryController
participant Database
User ->>CategoryController: unfollow(category)
CategoryController->>Database: unfollow(user_id,category)
alt Success
Database-->>CategoryController: <OK>
CategoryController-->>User: Unfollowed category successfully.
else Failure
Database-->>CategoryController: <ERROR>
CategoryController-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant PostController
participant CategoryController
participant Database
User ->>PostController: viewGallery(category)
PostController->>CategoryController: fetchGallery(category)
CategoryController->>Database: fetchGallery(category)
alt Success
Database-->>CategoryController: <OK, gallery>
CategoryController-->>PostController: <gallery>
PostController-->>User: displayGallery(gallery)
else Failure
Database-->>CategoryController: <ERROR>
CategoryController-->>PostController: <ERR_CODE>
PostController-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant PostController
participant CategoryController
participant Database
User ->>PostController: viewDiscussions(category)
PostController->>CategoryController: fetchDiscussions(category)
CategoryController->>Database: fetchDiscussions(category)
alt Success
Database-->>CategoryController: <OK, discussions>
CategoryController-->>PostController: <discussions>
PostController-->>User: displayDiscussions(discussions)
else Failure
Database-->>CategoryController: <ERROR>
CategoryController-->>PostController: <ERR_CODE>
PostController-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant UserController
participant Database
User ->>UserController: viewProfile(user_id)
UserController->>Database: fetchProfile(user_id)
alt Success
Database-->>UserController: <OK, details, posts, comments>
UserController-->>User: displayProfile(details, posts, comments)
else Failure
Database-->>UserController: <ERROR>
UserController-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant UserController
participant Database
User ->>UserController: followUser(user_id, value)
UserController->>Database: followUser(user_id, value)
alt Success
Database-->>UserController: <OK, follower_count>
UserController-->>User: displayFollowers(follower_count)
else Failure
Database-->>UserController: <ERROR>
UserController-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant UserController
participant Database
User ->>UserController: viewOwnProfile(user_id)
UserController->>Database: fetchOwnProfile(user_id)
alt Success
Database-->>UserController: <OK, details, posts, comments>
UserController-->>User: displayProfile(details, posts, comments)
else Failure
Database-->>UserController: <ERROR>
UserController-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant UserController
participant Database
User ->>UserController: updateAttribute(user_id, attribute)
UserController->>Database: updateAttribute(user_id, attribute)
alt Success
Database-->>UserController: <OK, attribute>
UserController-->>User: displayAttribute(attribute)
else Failure
Database-->>UserController: <ERROR>
UserController-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
participant User
participant PostController
participant WikidataAPI
participant Database
User->>PostController: search(query)
PostController->>WikidataAPI: fetchKeywords(query)
alt Keywords
WikidataAPI-->>Database: searchDatabase(query, keywords)
else No Keywords
WikidataAPI-->>Database: searchDatabase(query)
end
alt Success
Database-->>PostController: <OK, results>
PostController-->>User: displayResults(results)
else Failure
Database-->>PostController: <ERROR>
PostController-->>User: <ERR_CODE, message>
end
sequenceDiagram
participant TournamentController
participant CategoryController
participant Database
participant PostController
participant UserProfileController
TournamentController ->> CategoryController: startWeeklyTournament(category_id)
CategoryController ->> Database: getPosts(category_id, week)
Database -->> CategoryController: <OK, post_list_with_likes>
CategoryController ->> PostController: findMostLikedPost(post_list)
PostController -->> CategoryController: <OK, most_liked_post>
CategoryController ->> TournamentController: declareWinner(most_liked_post)
TournamentController ->> UserProfileController: awardPoints(user_id, points)
UserProfileController ->> Database: updateUserPoints(user_id, points)
Database -->> UserProfileController: <OK>
TournamentController -->> UserProfileController: displayPointsOnProfile(user_id)
sequenceDiagram
actor User
participant PostController
participant Database
participant TournamentController
User ->> PostController: createPost(title, content, category, tournament_entry)
PostController ->> TournamentController: checkTournamentStatus(category)
alt Tournament Active
TournamentController -->> PostController: <tournament_active>
PostController ->> TournamentController: savePost(user_id, title, content, category, tournament_entry)
alt Success
Database -->> PostController: <OK>
PostController -->> User: Post created and entered into tournament successfully.
else Failure
Database -->> PostController: <ERROR>
PostController -->> User: <ERR_CODE, errorMessage>
end
else Tournament Not Active
TournamentController -->> PostController: <no_tournament>
PostController ->> TournamentController: savePost(user_id, title, content, category)
alt Success
Database -->> PostController: <OK>
PostController -->> User: Post created but no active tournament.
else Failure
Database -->> PostController: <ERROR>
PostController -->> User: <ERR_CODE, errorMessage>
end
end
Prepared By Oğuz Kağnıcı, Improved and Reviewed By Deniz Ulaş Poyraz
🏠Home
- Third Customer Milestone Report
- RAM
- Requirements
- Mockups
- Sequence Diagrams
- Use Case Diagram
- Class Diagrams
- Scenarios
- User Scenario
- User Manual
- System Manual
- Third Customer Milestone Report
- Second Customer Milestone Report
- First Customer Milestone Report
- RAM
- Requirements
- Mockups
- Sequence Diagrams
- Scenarios
- Use Case Diagram
- Class Diagrams
- Software Quality Plan
- Milestone1 Presentation Scenarios
- Post Creation Page
- User Scenario
- Meeting Notes 10 - Dec 10
- Meeting Notes 9 - Dec 3
- Meeting Notes 8 - Nov 17
- Meeting Notes 7 - Nov 12
- Meeting Notes 6 - Nov 5
- Optional Meeting Notes 1 ‐ Oct 21
- Meeting Notes 5 - Oct 15
- Meeting Notes 4 - Oct 8
- Meeting Notes 3 - Oct 3
- Meeting Notes 2 - Oct 1
- Meeting Notes 1 - Sep 24
- Deniz Ulaş Poyraz
- Eren Donmez
- Ersel Çanakçılı
- Oğuz Kağnıcı
- Onur Çerli
- Yekta Ercul
- Ali Alperen Sönmez
- Huseyin Turker Erdem
- Mehmet Tuluyhan Sozen
352 Material
- Final Milestone Report
- Milestone 2 Report
- RAM
- Use Case Diagram
- Sequence Diagrams
- Class Diagrams
- Requirements
- Elicitation Questions
- Mockups
- Scenarios
- Milestone 1 Report
- Our Favourite Repositories
- Linked Data and SPARQL
- Web Application Development
- API Development and Utilization
- Wikidata and Wikidata API
- Mobile Application Development
- Android Studio
- Git
- Meeting Notes 10 ‐ May 10th
- Meeting Notes 9 ‐ Apr 25th
- Meeting Notes 8 ‐ Apr 21st
- Meeting Notes 7 ‐ Apr 12th
- Meeting Notes 6 ‐ Mar 14th
- Meeting Notes 5 ‐ Mar 11th
- Meeting Notes 4 - Mar 7th
- Meeting Notes 3 - Mar 3rd
- Meeting Notes 2 - Feb 22nd
- Meeting Notes 1 - Feb 18th