Class OfficerRegistration

java.lang.Object
com.ntu.fdae.group1.bto.models.project.OfficerRegistration

public class OfficerRegistration extends Object
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 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 registration
      officerNric - NRIC of the officer making the request
      projectId - ID of the project the officer wants to work on
      requestDate - Date when the request was submitted
  • Method Details

    • getRegistrationId

      public String getRegistrationId()
      Gets the unique identifier for this registration.
      Returns:
      The registration ID
    • getOfficerNric

      public String getOfficerNric()
      Gets the NRIC of the officer requesting to work on the project.
      Returns:
      The officer's NRIC
    • getProjectId

      public String getProjectId()
      Gets the ID of the project the officer is requesting to work on.
      Returns:
      The project ID
    • getRequestDate

      public LocalDate getRequestDate()
      Gets the date when the registration request was submitted.
      Returns:
      The request date
    • getStatus

      public OfficerRegStatus getStatus()
      Gets the current status of this registration request.

      Possible statuses include PENDING, APPROVED, and REJECTED.

      Returns:
      The current registration status
    • setStatus

      public void setStatus(OfficerRegStatus status)
      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