Class Diagram 352 - bounswe/bounswe2024group5 GitHub Wiki

classDiagram
    class User{
        -username: String
        -name: String
        -surname: String
        -password: String
        -email: String
        -profile: Profile
        -blockedUsers: List~User~
        -likedContents: List~Content~
        -postedContents: List~Content~
        +User(username: String, password: String, email: String)
        +postContent(content: Content)
        +deleteContent(content: Content)
        +likeContent(content: Content)
        +unlikeContent(content: Content)
        +getUsername() String
        +getName() String
        +getSurname() String
        +getPasword() String
        +getProfile() Profile
        +getBlockedUsers() List~User~
        +getEmail() String
        +setUsername(username: String)
        +setName(name: String)
        +setSurname(surname: String)
        +setPassword(password: String)
        +setEmail(email: String)
        +blockUser(username: String)
        +unblockUser(username: String)
        +followUser(user: User)
        +unfollowUser(user: User)
        +updateProfile(parameters: Map~key: String, value: Object~)
        +logout() : int
    }

    class UserController{
        +register(username: String, password: String, email: String) int
        +login(username: String, password: String) int
        +logout(username: String) int
    }

    class Profile{
        -followingList: List~User~
        -followerList: List~User~
        -sharedPosts: List~Post~
        -bio: String
        -publicName: String
        -profilePicture: String
        -socialPlatforms: List~String~
        -private: boolean
        -searchHistory: List~String~
        +Profile(publicName: String)
        +getFollowingList() List~User~
        +getFollowerList() List~User~
        +getSharedPosts() List~Post~
        +getBio() String
        +getPublicName() String
        +getProfilePicture() String
        +getSocialPlatforms() List~String~
        +getPrivate() boolean
        +getSearchHistory() List~String~
        +addFollower(follower: User) boolean
        +addFollowing(followed: User) boolean
        +addSharedPost(post: Post) boolean
        +deleteFollower(follower: User) boolean
        +deleteFollowing(followed: User) boolean
        +deleteSharedPost(post: Post) boolean
        +setBio(bio: String) boolean
        +setPublicName(publicName: String) boolean
        +setProfilePicture(picture: String) boolean
        +addSocialPlatforms(socialPlatform: String) boolean
        +deleteSocialPlatforms(socialPlatform: String) boolean
        +setPrivate(isPrivate: boolean) boolean
        +addSearchHistory(search: String) boolean
        +deleteSearchHistory(search: String) boolean
        +clearSearchHistory() boolean
    }

    class Content{
        <<abstract>>
        -author: User
        -creationTimestamp: int
        -editTimestamp: int
        -text: String
        -likeList: List~User~
        +getAuthor() : User
        +getCreationTimestamp() int
        +getEditTimestamp() int
        +editContent(text: String)
        +getLikeList() List~User~
        +addLikedUser(user: User) boolean
        +removeLikedUser(user: User) boolean
        +editContent(text: String) boolean
    }
    
    class Post{
        -postID: String
        -comments: List~Comment~
        -imageURL: String
        -videoURL: String
        -tag: String
        +Post(author: User, text: String, tag: String)
        +getPostID() String
        +getComments() List~String~
        +getImage() String
        +getVideo() String
        +getTag() String
        +addComment(comment: Comment) boolean
        +removeComment(comment: Comment) boolean
        +setImage(imageURL: String) boolean
        +setVideo(videoURL: String) boolean
    }

    class Comment{
        -commentID: String
        -parentPost: Post
        +Comment(author: User, text: String, parentPost: Post)
        +getCommentID() String
        +getParentPost() String
    }

    class SearchEngine{
        +searchUsers(user: User, query: String, filter: Filter) List~User~
        +searchPosts(user: User, query: String, filter: Filter) List~Post~
        +getFeed(user: User) List~Post~
    }

    class Filter{
        -parameters: Map~fieldKey: String, fieldValue: Object~
        +Filter(Map~fieldKey: String, fieldValue: Object~)
        +getParameters() Map~fieldKey: String, fieldValue: Object~
        +addParameter(key: String, value: Object)
        +removeParameter(key: String)
    }

    
    Post "1" -- "0..*" User : interacts
    Profile "1" --* "1" User : owns

    Post "1" *-- "0..*" Comment : owns

    User "0..*" -- "0..*" User : interacts

    Content <|-- Post
    Content <|-- Comment

    Content "*" -- "1" User : owns

    User -- SearchEngine : uses
    UserController -- User : controls
    SearchEngine ..> Filter : uses

Loading
⚠️ **GitHub.com Fallback** ⚠️