- java.lang.Object
-
- controllers.UserController
-
- controllers.StaffController
-
public class StaffController extends UserController
TheStaffController
class provides methods to manage staff related functionalities in the CAMS application. It includes operations such as changing passwords, creating and managing camps, handling enquiries and suggestions, and generating reports.
-
-
Field Summary
Fields Modifier and Type Field Description private static ICampStaffService
campStaffService
This class has-aICampStaffService
object deal with Services regading the campprivate static IEnquiryStaffService
enquiryStaffService
This class has-aIEnquiryStaffService
object deal with enquiries from the student regading the campprivate static IReportGeneratorService
reportGeneratorService
This class has-aIReportGeneratorService
object which the staff can use to generate a report regarding the campprivate static java.util.Scanner
sc
Scanner
object to get inputprivate static ISuggestionStaffService
suggestionStaffService
This class has-aISuggestionStaffService
object deal with suggestions from the student regading the camp
-
Constructor Summary
Constructors Constructor Description StaffController()
Default constructor for the StaffContoller class
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
approveSuggestion(ISuggestionView suggestionView)
Staff can approve or reject a selected suggestion and provides a response.private void
createCamps()
Allows staff to create multiple camps by providing information: camp name, dates, registration due date, schools, location, total slots, description and visibilityprivate void
deleteCamp()
Deletes a specific camp, including all associated data (enquiries, suggestions).private void
editCamp()
Edits the details of a specific camp, allowing staff to modify various attributes such as name, dates, closing date, schools, location, total slots, and description.private void
generateCampReport()
Staff can generate a detailed report for a specific camp, including information about attendees and camp committee members.private void
generatePerformanceReport()
Staff members can generate a performance report for a specific camp.private void
replyToEnquiries(IEnquiryView enquiryView)
Staff to reply to a selected enquiry with response.void
start()
Starts the staff user session, providing access to various staff specific functionalities.private void
toggleCamp()
Toggles the visibility of selected camps.private void
viewAllCamps(ICampView campView)
Displays all camps regardless who is the creator, providing detailed information about each camp.private void
viewEnquiries(IEnquiryView enquiryView)
Displays enquiries from all camps created by current staff, providing details about each enquiry.private void
viewSuggestion(ISuggestionView suggestionView)
Displays suggestions from all camps created by staff, providing details about each suggestion.-
Methods inherited from class controllers.UserController
changePassword
-
-
-
-
Field Detail
-
sc
private static final java.util.Scanner sc
Scanner
object to get input
-
campStaffService
private static final ICampStaffService campStaffService
This class has-aICampStaffService
object deal with Services regading the camp
-
enquiryStaffService
private static final IEnquiryStaffService enquiryStaffService
This class has-aIEnquiryStaffService
object deal with enquiries from the student regading the camp
-
suggestionStaffService
private static final ISuggestionStaffService suggestionStaffService
This class has-aISuggestionStaffService
object deal with suggestions from the student regading the camp
-
reportGeneratorService
private static final IReportGeneratorService reportGeneratorService
This class has-aIReportGeneratorService
object which the staff can use to generate a report regarding the camp
-
-
Method Detail
-
start
public void start()
Starts the staff user session, providing access to various staff specific functionalities.
-
viewAllCamps
private void viewAllCamps(ICampView campView)
Displays all camps regardless who is the creator, providing detailed information about each camp.- Parameters:
campView
- The view interface that displays the camp details
-
createCamps
private void createCamps()
Allows staff to create multiple camps by providing information: camp name, dates, registration due date, schools, location, total slots, description and visibility
-
editCamp
private void editCamp()
Edits the details of a specific camp, allowing staff to modify various attributes such as name, dates, closing date, schools, location, total slots, and description.
-
deleteCamp
private void deleteCamp()
Deletes a specific camp, including all associated data (enquiries, suggestions). Staff members need to confirm their intention to delete a camp.
-
toggleCamp
private void toggleCamp()
Toggles the visibility of selected camps. Staff members can choose to make camps visible or invisible.
-
viewEnquiries
private void viewEnquiries(IEnquiryView enquiryView)
Displays enquiries from all camps created by current staff, providing details about each enquiry.- Parameters:
enquiryView
- The view interface for displaying enquiry details.
-
replyToEnquiries
private void replyToEnquiries(IEnquiryView enquiryView)
Staff to reply to a selected enquiry with response.- Parameters:
enquiryView
- The view interface for displaying enquiry details.
-
viewSuggestion
private void viewSuggestion(ISuggestionView suggestionView)
Displays suggestions from all camps created by staff, providing details about each suggestion.- Parameters:
suggestionView
- The view interface for displaying suggestion details.
-
approveSuggestion
private void approveSuggestion(ISuggestionView suggestionView)
Staff can approve or reject a selected suggestion and provides a response. Staff need to confirm their decision.- Parameters:
suggestionView
- The view interface for displaying suggestion details.
-
generatePerformanceReport
private void generatePerformanceReport()
Staff members can generate a performance report for a specific camp. Staff members can choose to filter the report for attendees only, camp committee only, or both.
-
generateCampReport
private void generateCampReport()
Staff can generate a detailed report for a specific camp, including information about attendees and camp committee members.
-
-