-
Notifications
You must be signed in to change notification settings - Fork 1
CMPE 352 ‐ Sequence Diagrams Draft
Eren Donmez edited this page Sep 24, 2024
·
1 revision
sequenceDiagram
actor User
participant UserInterface
participant Database
User->>UserInterface: createPost(title, content)
UserInterface->>Database: savePost(user_id, title, content)
alt Success
Database-->>UserInterface: <OK>
UserInterface-->>User: Post created successfully.
else Failure
Database-->>UserInterface: <ERR_CODE>
UserInterface-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant UserInterface
participant Database
User ->>UserInterface: deletePost(post_id)
UserInterface->>Database: deletePost(post_id)
alt Success
Database-->>UserInterface: <OK>
UserInterface-->>User: Post deleted successfully.
else Failure
Database-->>UserInterface: <ERR_CODE>
UserInterface-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant UserInterface
participant Database
User ->>UserInterface: viewPost(post_id)
UserInterface->>Database: viewPost(post_id)
alt Success
Database-->>UserInterface: <OK, content, comments>
UserInterface-->>User: displayContent(content)
UserInterface-->>User: displayComments(comments)
else Failure
Database-->>UserInterface: <ERR_CODE>
UserInterface-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant UserInterface
participant Database
User ->>UserInterface: likePost(post_id, value)
UserInterface->>Database: likePost(user_id, post_id, value)
alt Success
Database-->>UserInterface: <OK, post_likes>
UserInterface-->>User: displayPostLikes(post_id)
else Failure
Database-->>UserInterface: <ERR_CODE>
UserInterface-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant UserInterface
participant Database
User ->>UserInterface: bookmarkPost(post_id)
UserInterface->>Database: bookmarkPost(user_id, post_id)
alt Success
Database-->>UserInterface: <OK>
UserInterface-->>User: Bookmark added successfully.
else Failure
Database-->>UserInterface: <ERR_CODE>
UserInterface-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant UserInterface
participant Database
User->>UserInterface: createComment(post_id, content)
UserInterface->>Database: saveComment(user_id, post_id, content)
alt Success
Database-->>UserInterface: <OK>
UserInterface-->>User: Comment created successfully.
else Failure
Database-->>UserInterface: <ERR_CODE>
UserInterface-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant UserInterface
participant Database
User->>UserInterface: deleteComment(post_id, comment_id)
UserInterface->>Database: deleteComment(post_id, comment_id)
alt Success
Database-->>UserInterface: <OK>
UserInterface-->>User: Comment deleted successfully.
else Failure
Database-->>UserInterface: <ERR_CODE>
UserInterface-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant UserInterface
participant Database
User ->>UserInterface: likeComment(post_id, comment_id, value)
UserInterface->>Database: likeComment(user_id, post_id, comment_id, value)
alt Success
Database-->>UserInterface: <OK, comment_likes>
UserInterface-->>User: displayCommentLikes(post_id, comment_id)
else Failure
Database-->>UserInterface: <ERR_CODE>
UserInterface-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant UserInterface
participant FeedController
participant Database
User ->>UserInterface: viewLatest(user_id)
UserInterface->>FeedController: fetchLatest(user_id)
FeedController->>Database: fetchLatest(user_id)
alt Success
Database-->>FeedController: <OK, latest>
FeedController-->>UserInterface: <latest>
UserInterface-->>User: displayLatestFeed(latest)
else Failure
Database-->>FeedController: <ERR_CODE>
FeedController-->>UserInterface: <ERR_CODE>
UserInterface-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant UserInterface
participant FeedController
participant Database
User ->>UserInterface: viewFollowing(user_id)
UserInterface->>FeedController: fetchFollowing(user_id)
FeedController->>Database: fetchFollowing(user_id)
alt Success
Database-->>FeedController: <OK, following>
FeedController-->>UserInterface: <following>
UserInterface-->>User: displayFollowingFeed(following)
else Failure
Database-->>FeedController: <ERR_CODE>
FeedController-->>UserInterface: <ERR_CODE>
UserInterface-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant UserInterface
participant Database
User ->>UserInterface: subscribeCommunity(user_id, community_id)
UserInterface->>Database: addSubscriber(user_id, community_id)
alt Success
Database-->>UserInterface: <OK>
UserInterface-->>User: Subscribed to community successfully.
else Failure
Database-->>UserInterface: <ERR_CODE>
UserInterface-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant UserInterface
participant Database
User ->>UserInterface: unsubscribeCommunity(user_id, community_id)
UserInterface->>Database: removeSubscriber(user_id, community_id)
alt Success
Database-->>UserInterface: <OK>
UserInterface-->>User: Unsubscribed from community successfully.
else Failure
Database-->>UserInterface: <ERR_CODE>
UserInterface-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant UserInterface
participant Database
User ->>UserInterface: viewProfile(user_id)
UserInterface->>Database: fetchProfile(user_id)
alt Success
Database-->>UserInterface: <OK, details, posts, comments>
UserInterface-->>User: displayProfile(details, posts, comments)
else Failure
Database-->>UserInterface: <ERR_CODE>
UserInterface-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant UserInterface
participant Database
User ->>UserInterface: followUser(user_id, value)
UserInterface->>Database: followUser(user_id, value)
alt Success
Database-->>UserInterface: <OK, follower_count>
UserInterface-->>User: displayFollowers(follower_count)
else Failure
Database-->>UserInterface: <ERR_CODE>
UserInterface-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant UserInterface
participant Database
User ->>UserInterface: viewOwnProfile(user_id)
UserInterface->>Database: fetchOwnProfile(user_id)
alt Success
Database-->>UserInterface: <OK, details, posts, comments>
UserInterface-->>User: displayProfile(details, posts, comments)
else Failure
Database-->>UserInterface: <ERR_CODE>
UserInterface-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
actor User
participant UserInterface
participant Database
User ->>UserInterface: updateAttribute(user_id, attribute)
UserInterface->>Database: updateAttribute(user_id, attribute)
alt Success
Database-->>UserInterface: <OK, attribute>
UserInterface-->>User: displayAttribute(attribute)
else Failure
Database-->>UserInterface: <ERR_CODE>
UserInterface-->>User: <ERR_CODE, errorMessage>
end
sequenceDiagram
participant User
participant UserInterface
participant WikidataAPI
participant Database
User->>UserInterface: search(query)
UserInterface->>WikidataAPI: fetchKeywords(query)
alt Keywords
WikidataAPI-->>Database: searchDatabase(query, keywords)
else No Keywords
WikidataAPI-->>Database: searchDatabase(query)
end
alt Success
Database-->>UserInterface: <OK, results>
UserInterface-->>User: displayResults(results)
else Failure
Database-->>UserInterface: <ERR_CODE>
UserInterface-->>User: <ERR_CODE, message>
end
Prepared By Oğuz Kağnıcı
🏠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