-
Notifications
You must be signed in to change notification settings - Fork 0
Admin Management and Moderator Functions Sequence Diagrams
Selman Akman edited this page Oct 15, 2025
·
9 revisions

@startuml
actor Admin
participant ":AdminService" as AdminService
participant ":User" as UserObj
Admin -> AdminService: manageAccount(userID, action, data)
alt Action = Create
AdminService -> UserObj: createUser(username, email, password)
alt Valid Input
UserObj --> AdminService: userCreated(userID)
AdminService --> Admin: showConfirmation("User " + username + " created")
else Invalid Input
UserObj --> AdminService: error("Invalid user data")
AdminService --> Admin: showError("Invalid username or email")
end
else Action = Edit
AdminService -> UserObj: getUser(userID)
alt User Exists
UserObj --> AdminService: userData
AdminService -> UserObj: updateUser(userID, newData)
UserObj --> AdminService: userUpdated()
AdminService --> Admin: showConfirmation("User updated")
else User Not Found
UserObj --> AdminService: error("User not found")
AdminService --> Admin: showError("Invalid user ID")
end
else Action = Delete
AdminService -> UserObj: getUser(userID)
alt User Exists
UserObj --> AdminService: userData
AdminService -> UserObj: deleteUser(userID)
UserObj --> AdminService: userDeleted()
AdminService --> Admin: showConfirmation("User deleted")
else User Not Found
UserObj --> AdminService: error("User not found")
AdminService --> Admin: showError("Invalid user ID")
end
end
@enduml
@startuml
actor Admin
participant ":AdminService" as AdminService
participant ":User" as UserObj
Admin -> AdminService: reviewUserActivity(userID)
AdminService -> UserObj: getUser(userID)
alt User Exists
UserObj --> AdminService: userData
AdminService -> AdminService: fetchLogs(userID, logType)
AdminService --> Admin: displayActivityLogs(wasteLogs, challengeLogs)
else User Not Found
UserObj --> AdminService: error("User not found")
AdminService --> Admin: showError("Invalid user ID")
end
@enduml
@startuml
actor Admin
participant ":NotificationService" as NotificationService
participant ":Notification" as NotificationObj
participant ":User" as UserObj
Admin -> NotificationService: sendPlatformNotification(message, userGroup, eventID)
alt Valid Message and Group
NotificationService -> UserObj: getUsersByGroup(userGroup)
UserObj --> NotificationService: userList
NotificationService -> NotificationObj: createNotification(message, userList, eventID)
NotificationObj --> NotificationService: notificationCreated()
NotificationService --> Admin: showConfirmation("Notifications sent to group")
else Invalid Input
NotificationService --> Admin: showError("Invalid message or user group")
end
@enduml
@startuml
actor Admin
participant ":AdminService" as AdminService
Admin -> AdminService: accessAnalytics()
AdminService -> AdminService: getAnalytics(dataType)
alt Success
AdminService --> Admin: displayAnalyticsDashboard(userStats, challengeStats)
else Data Unavailable
AdminService --> Admin: showError("Failed to load analytics data")
end
@enduml
@startuml
actor Admin
participant ":AdminService" as AdminService
Admin -> AdminService: updatePlatformSettings(notificationSettings, platformConfig)
AdminService -> AdminService: getCurrentSettings()
alt Valid Settings
AdminService -> AdminService: validateSettings(notificationSettings, platformConfig)
AdminService -> AdminService: saveSettings(notificationSettings, platformConfig)
AdminService --> Admin: showConfirmation("Settings updated")
else Invalid Settings
AdminService --> Admin: showError("Invalid settings configuration")
end
@enduml
@startuml
actor Admin
participant ":WasteCategoryService" as CategoryService
participant ":WasteCategory" as CategoryObj
participant ":NotificationService" as NotificationService
Admin -> CategoryService: approveCustomCategory(categoryID, score, unit)
CategoryService -> CategoryObj: getCategory(categoryID)
alt Valid Category
CategoryObj --> CategoryService: categoryData(name, userID)
CategoryService -> CategoryObj: updateCategory(status=approved, score, unit)
CategoryService -> NotificationService: sendApprovalNotification(userID, "Category " + name + " approved")
NotificationService --> Admin: showConfirmation("Category approved")
else Invalid Category
CategoryObj --> CategoryService: error("Category not found")
CategoryService --> Admin: showError("Invalid category ID")
end
@enduml
@startuml
actor Admin
participant ":ChallengeService" as ChallengeService
participant ":Challenge" as ChallengeObj
Admin -> ChallengeService: manageChallenge(challengeID, action, name, startDate, endDate)
alt Action = Create
ChallengeService -> ChallengeObj: createChallenge(name, startDate, endDate)
alt Valid Data
ChallengeObj --> ChallengeService: challengeCreated()
ChallengeService --> Admin: showConfirmation("Challenge " + name + " created")
else Invalid Data
ChallengeObj --> ChallengeService: error("Invalid challenge data")
ChallengeService --> Admin: showError("Invalid challenge details")
end
else Action = Edit
ChallengeService -> ChallengeObj: getChallenge(challengeID)
alt Challenge Exists
ChallengeObj --> ChallengeService: challengeData
ChallengeService -> ChallengeObj: updateChallenge(challengeID, name, startDate, endDate)
ChallengeObj --> ChallengeService: challengeUpdated()
ChallengeService --> Admin: showConfirmation("Challenge updated")
else Challenge Not Found
ChallengeObj --> ChallengeService: error("Challenge not found")
ChallengeService --> Admin: showError("Invalid challenge ID")
end
else Action = Delete
ChallengeService -> ChallengeObj: getChallenge(challengeID)
alt Challenge Exists
ChallengeObj --> ChallengeService: challengeData
ChallengeService -> ChallengeObj: deleteChallenge(challengeID)
ChallengeObj --> ChallengeService: challengeDeleted()
ChallengeService --> Admin: showConfirmation("Challenge deleted")
else Challenge Not Found
ChallengeObj --> ChallengeService: error("Challenge not found")
ChallengeService --> Admin: showError("Invalid challenge ID")
end
end
@enduml
@startuml
actor Admin
participant ":ChallengeService" as ChallengeService
participant ":AchievementService" as AchievementService
participant ":Challenge" as ChallengeObj
participant ":User" as UserObj
Admin -> ChallengeService: awardPoints(completionID)
ChallengeService -> ChallengeObj: getChallenge(completionID)
alt Valid Completion
ChallengeObj --> ChallengeService: challengeData(points, userID)
ChallengeService -> AchievementService: earn(userID, points, challengeID)
AchievementService -> UserObj: getUser(userID)
UserObj --> AchievementService: userData
AchievementService -> UserObj: updateScore(points)
UserObj --> AchievementService: scoreUpdated()
AchievementService --> Admin: showConfirmation("Points awarded for challenge")
else Invalid Completion
ChallengeObj --> ChallengeService: error("Invalid completion")
ChallengeService --> Admin: showError("Invalid completion ID")
end
@enduml
@startuml
actor Moderator
participant ":ModeratorService" as ModeratorService
participant ":NotificationService" as NotificationService
participant ":Notification" as NotificationObj
participant ":User" as UserObj
Moderator -> ModeratorService: sendMessage(userID, message)
ModeratorService -> UserObj: getUser(userID)
alt Valid User
UserObj --> ModeratorService: userData
ModeratorService -> NotificationService: sendNotification(userID, message)
NotificationService -> NotificationObj: createNotification(userID, message)
alt Valid Message
NotificationObj --> NotificationService: notificationCreated()
NotificationService --> Moderator: showConfirmation("Message sent to user")
else Invalid Message
NotificationObj --> NotificationService: error("Invalid message")
NotificationService --> Moderator: showError("Invalid message content")
end
else Invalid User
UserObj --> ModeratorService: error("User not found")
ModeratorService --> Moderator: showError("Invalid user ID")
end
@enduml
Code:
@startuml
actor Moderator
participant ":ModeratorService" as ModeratorService
participant ":User" as UserObj
Moderator -> ModeratorService: warnOrSuspendUser(userID, action, reason, duration)
ModeratorService -> UserObj: getUser(userID)
alt Valid User
UserObj --> ModeratorService: userData
alt Action = Warn
ModeratorService -> UserObj: warnUser(reason)
UserObj --> ModeratorService: warningApplied()
ModeratorService --> Moderator: showConfirmation("User warned")
else Action = Suspend
ModeratorService -> UserObj: suspendUser(duration, reason)
UserObj --> ModeratorService: suspensionApplied()
ModeratorService --> Moderator: showConfirmation("User suspended for " + duration)
else Invalid Action
ModeratorService --> Moderator: showError("Invalid action")
end
else Invalid User
UserObj --> ModeratorService: error("User not found")
ModeratorService --> Moderator: showError("Invalid user ID")
end
@enduml
@startuml
actor Moderator
participant ":ModeratorService" as ModeratorService
participant ":Tip" as TipObj
Moderator -> ModeratorService: reviewContent(contentID, decision)
ModeratorService -> TipObj: getContent(contentID)
alt Valid Content
TipObj --> ModeratorService: contentData(type=Tip)
ModeratorService -> TipObj: updateContentStatus(decision=approve/reject)
TipObj --> ModeratorService: statusUpdated()
ModeratorService --> Moderator: showConfirmation("Content reviewed: " + decision)
else Invalid Content
TipObj --> ModeratorService: error("Content not found")
ModeratorService --> Moderator: showError("Invalid content ID")
end
@enduml
@startuml
actor Moderator
participant ":ModeratorService" as ModeratorService
participant ":AdminService" as AdminService
Moderator -> ModeratorService: escalateIssue(issueID, notes)
ModeratorService -> ModeratorService: getIssue(issueID)
alt Valid Issue
ModeratorService --> ModeratorService: issueDetails
ModeratorService -> AdminService: notifyAdmin(issueID, notes)
AdminService --> ModeratorService: issueReceived()
ModeratorService --> Moderator: showConfirmation("Issue escalated with notes")
else Invalid Issue
ModeratorService --> Moderator: showError("Invalid issue ID")
end
@enduml
@startuml
actor Admin
participant ":EventService" as EventService
participant ":EventType" as EventTypeObj
Admin -> EventService: manageEventType(eventTypeID, action, name, description)
alt Action = Create
EventService -> EventTypeObj: createEventType(name, description)
alt Valid Data
EventTypeObj --> EventService: eventTypeCreated()
EventService --> Admin: showConfirmation("Event type " + name + " created")
else Invalid Data
EventTypeObj --> EventService: error("Invalid event type data")
EventService --> Admin: showError("Invalid event type details")
end
else Action = Update
EventService -> EventTypeObj: getEventType(eventTypeID)
alt Event Type Exists
EventTypeObj --> EventService: eventTypeData
EventService -> EventTypeObj: updateEventType(eventTypeID, name, description)
EventTypeObj --> EventService: eventTypeUpdated()
EventService --> Admin: showConfirmation("Event type updated")
else Event Type Not Found
EventTypeObj --> EventService: error("Event type not found")
EventService --> Admin: showError("Invalid event type ID")
end
end
@enduml
@startuml
actor Moderator
participant ":ModeratorService" as ModeratorService
participant ":EventInteractionService" as EventInteractionService
participant ":EventInteraction" as EventInteractionObj
Moderator -> ModeratorService: moderateEventInteraction(interactionID, action=approve/reject)
ModeratorService -> EventInteractionService: getInteraction(interactionID)
alt Valid Interaction
EventInteractionService -> EventInteractionObj: getInteractionData()
EventInteractionObj --> EventInteractionService: interactionData(userID, attendance_status, emoji_reaction)
EventInteractionService -> EventInteractionObj: moderateInteraction(action)
EventInteractionObj --> EventInteractionService: interactionUpdated()
EventInteractionService --> Moderator: showConfirmation("Interaction " + action)
else Invalid Interaction
EventInteractionService --> Moderator: showError("Invalid interaction ID")
end
@enduml- Lab1
- Lab 1 Meeting Notes
- Lab2
- Lab 2 Meeting Notes
- Lab3
- Lab 3 Meeting Notes
- Lab4
- Lab4 Meeting Notes
- Lab5
- Lab5 Meeting Notes
- Lab 5: MVP Implementation & Planning
- Lab6
- Lab6 Meeting Notes
- Lab7
- Lab7 Meeting Notes
- Lab 7: Milestone 2 Demo Preparation
- Lab8
- Lab8 Meeting Notes
- Lab 8: Requirements Review & Acceptance Planning
- Lab9
- Lab 9: Milestone 3 Demo Preparation
- Lab9 Meeting Notes
- Ahmet's Bio
- Barathan's Bio
- Berkay's Bio
- Berke's Bio
- Caglar's Bio
- Mehmet Emin's Bio
- Nilsu's Bio
- Ömer's Bio
- Selman's Bio
- Taha's Bio
Ahmet Okta
Barathan Aslan
Berke Kartal
Mehmet Çağlar Kurt
Mehmet Emin Atak
Muhammet Berkay Keskin
Mustafa Taha Söylemez
Nilsu Tüysüz
Selman Akman
Ömer Faruk Bayram
- Use Case Diagram
- Class Diagram
- Sequence Diagrams - Admin Management and Moderator Functions
- Sequence Diagrams - Rewards, Badges and Leaderboard System
- Sequence Diagrams - Notification System
- Sequence Diagrams - Tips and Recommendations
- Sequence Diagrams - Challenge and Activity Tracking
- Sequence Diagrams - Waste Tracking and Scoring System
- Sequence Diagrams - User and Account Management
- Sequence Diagrams - Goal Management
- Sequence Diagrams - Authentication
- Sequence Diagrams - Session Management
- Sequence Diagrams - Events Management
- Project Plan
- Requirements
- Elicitation Questions & Answers
- Scenario #1
- Scenario #2
- Scenario #3
- Scenario #4
- Scenario #5
- Scenario #6
- Scenario #7
- Scenario #8
- Scenario #9
- Scenario #10
- Scenario #11
- Scenario #12
- Scenario #13
- Scenario #14
- Use Case Diagram
- Class Diagram
- Sequence Diagrams - Admin Management and Moderator Functions
- Sequence Diagrams - Rewards,Badges and Leaderboard System
- Sequence Diagrams - Notification System
- Sequence Diagrams - Tips and Recommendations
- Sequence Diagrams - Challenge and Activity Tracking
- Sequence Diagrams - Waste Tracking and Scoring System
- Sequence Diagrams - User and Account Management
- Sequence Diagrams - Goal Management
- Sequence Diagrams - Auth
- Sequence Diagrams - Session Management
- User Manual for Frontend-Web
- System Manual for Frontend-Web
- Research Documentation for Frontend-Web
- Testing Manual for Frontend-Web