- java.lang.Object
-
- controllers.UserController
-
- controllers.StaffController
-
public class StaffController extends UserController
TheStaffControllerclass 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 ICampStaffServicecampStaffServiceThis class has-aICampStaffServiceobject deal with Services regading the campprivate static IEnquiryStaffServiceenquiryStaffServiceThis class has-aIEnquiryStaffServiceobject deal with enquiries from the student regading the campprivate static IReportGeneratorServicereportGeneratorServiceThis class has-aIReportGeneratorServiceobject which the staff can use to generate a report regarding the campprivate static java.util.ScannerscScannerobject to get inputprivate static ISuggestionStaffServicesuggestionStaffServiceThis class has-aISuggestionStaffServiceobject 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 voidapproveSuggestion(ISuggestionView suggestionView)Staff can approve or reject a selected suggestion and provides a response.private voidcreateCamps()Allows staff to create multiple camps by providing information: camp name, dates, registration due date, schools, location, total slots, description and visibilityprivate voiddeleteCamp()Deletes a specific camp, including all associated data (enquiries, suggestions).private voideditCamp()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 voidgenerateCampReport()Staff can generate a detailed report for a specific camp, including information about attendees and camp committee members.private voidgeneratePerformanceReport()Staff members can generate a performance report for a specific camp.private voidreplyToEnquiries(IEnquiryView enquiryView)Staff to reply to a selected enquiry with response.voidstart()Starts the staff user session, providing access to various staff specific functionalities.private voidtoggleCamp()Toggles the visibility of selected camps.private voidviewAllCamps(ICampView campView)Displays all camps regardless who is the creator, providing detailed information about each camp.private voidviewEnquiries(IEnquiryView enquiryView)Displays enquiries from all camps created by current staff, providing details about each enquiry.private voidviewSuggestion(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
Scannerobject to get input
-
campStaffService
private static final ICampStaffService campStaffService
This class has-aICampStaffServiceobject deal with Services regading the camp
-
enquiryStaffService
private static final IEnquiryStaffService enquiryStaffService
This class has-aIEnquiryStaffServiceobject deal with enquiries from the student regading the camp
-
suggestionStaffService
private static final ISuggestionStaffService suggestionStaffService
This class has-aISuggestionStaffServiceobject deal with suggestions from the student regading the camp
-
reportGeneratorService
private static final IReportGeneratorService reportGeneratorService
This class has-aIReportGeneratorServiceobject 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.
-
-