Skip to content

Sequence Diagrams

Semih Yılmaz edited this page Apr 27, 2024 · 32 revisions

Follow-Unfollow User

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
    end
    alt 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
Loading

Create Post

sequenceDiagram
    actor R as Registered User
    alt post
        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
    end
Loading

Filter Songs

sequenceDiagram
    actor R as User
    alt filterSongs
        R->>+ SearchEngine: filterSongs(parameters ...)
        SearchEngine->>+ Database: get_appropriate_songs(parameters ...)
        alt searching is successful
            Database-->>SearchEngine: songsReturnedAsList
            SearchEngine-->>R: songsReturnedAsList
        else searching is not successful
            Database-->>-SearchEngine: noSongFound
            SearchEngine-->>-R: noSongFound
        end
    end
Loading

Filter User Profiles

sequenceDiagram
    actor R as User
    alt filterUserProfiles
        R->>+ SearchEngine: filterUsers(parameters ...)
        SearchEngine->>+ Database: get_appropriate_user_profiles(parameters ...)
        alt searching is successful
            Database-->>SearchEngine: profilesReturnedAsList
            SearchEngine-->>R: profilesReturnedAsList
        else searching is not successful
            Database-->>-SearchEngine: noProfileFound
            SearchEngine-->>-R: noProfileFound
        end
    end
Loading

Change Profile Details

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
Loading

🏠 Home

🗃️ All Project Files

💻 Lab Reports

📝 Meeting Notes

Lab Meeting Notes
Team Meeting Notes
🧑🏻‍💻 About Us
🗂️ Templates
CmpE 352

🚀 Important Project Files

🗃️ All Project Files
📝 352 Meeting Notes
📜 Research & Resources
Clone this wiki locally