Class OfficerRegistration
java.lang.Object
com.ntu.fdae.group1.bto.models.project.OfficerRegistration
Represents a registration request from an HDB officer to work on a specific
BTO project.
This class models the relationship between HDB officers and BTO projects, tracking the request and approval workflow for officer assignments. Officer registrations are subject to approval by project managers before officers can work on projects.
The registration process is part of the system's authorization model:- Officers submit registration requests for projects they wish to work on
- Project managers review and either approve or reject these requests
- Approved officers gain access to manage applications for those projects
Each registration has a status (PENDING, APPROVED, REJECTED) that tracks its position in the workflow.
-
Constructor Summary
ConstructorsConstructorDescriptionOfficerRegistration
(String registrationId, String officerNric, String projectId, LocalDate requestDate) Constructs a new OfficerRegistration with the specified details. -
Method Summary
Modifier and TypeMethodDescriptionGets the NRIC of the officer requesting to work on the project.Gets the ID of the project the officer is requesting to work on.Gets the unique identifier for this registration.Gets the date when the registration request was submitted.Gets the current status of this registration request.boolean
Checks if this registration request has been approved.boolean
Checks if this registration request is still pending review.boolean
Checks if this registration request has been rejected.void
setStatus
(OfficerRegStatus status) Sets the status of this registration request.
-
Constructor Details
-
OfficerRegistration
public OfficerRegistration(String registrationId, String officerNric, String projectId, LocalDate requestDate) Constructs a new OfficerRegistration with the specified details.By default, new registrations are created with a PENDING status.
- Parameters:
registrationId
- Unique identifier for this registrationofficerNric
- NRIC of the officer making the requestprojectId
- ID of the project the officer wants to work onrequestDate
- Date when the request was submitted
-
-
Method Details
-
getRegistrationId
Gets the unique identifier for this registration.- Returns:
- The registration ID
-
getOfficerNric
Gets the NRIC of the officer requesting to work on the project.- Returns:
- The officer's NRIC
-
getProjectId
Gets the ID of the project the officer is requesting to work on.- Returns:
- The project ID
-
getRequestDate
Gets the date when the registration request was submitted.- Returns:
- The request date
-
getStatus
Gets the current status of this registration request.Possible statuses include PENDING, APPROVED, and REJECTED.
- Returns:
- The current registration status
-
setStatus
Sets the status of this registration request.This method is typically called by project managers when they review and make decisions on pending registration requests.
- Parameters:
status
- The new status to set
-
isApproved
public boolean isApproved()Checks if this registration request has been approved.- Returns:
- true if the status is APPROVED, false otherwise
-
isRejected
public boolean isRejected()Checks if this registration request has been rejected.- Returns:
- true if the status is REJECTED, false otherwise
-
isPending
public boolean isPending()Checks if this registration request is still pending review.- Returns:
- true if the status is PENDING, false otherwise
-