Interface IEligibilityService

All Known Implementing Classes:
EligibilityService

public interface IEligibilityService
Service interface for determining eligibility of users for various BTO system operations. This interface provides methods to check if users meet the requirements for specific actions within the BTO Management System, including:
  • Applicant eligibility for projects based on demographic criteria
  • Applicant eligibility for specific flat types based on household size and composition
  • Officer eligibility to register for projects based on workload and conflict-of-interest rules
The eligibility rules encapsulate complex business logic that considers factors like:
  • Age and marital status requirements for different flat types
  • Income ceiling restrictions
  • Maximum project assignments for officers
  • Conflict of interest prevention
  • Method Details

    • canApplicantApply

      boolean canApplicantApply(User user, Project project)
      Checks if an applicant meets the eligibility criteria for a specific project.

      This method considers factors such as age, marital status, income level, and whether the project offers suitable flat types for the applicant.

      Parameters:
      user - The user applying for the project
      project - The project to check eligibility for
      Returns:
      true if the applicant is eligible for the project, false otherwise
    • isApplicantEligibleForFlatType

      boolean isApplicantEligibleForFlatType(User user, FlatType flatType)
      Checks if an applicant is eligible for a specific flat type. Different flat types have different eligibility criteria. For example:
      • Singles may only be eligible for smaller flat types
      • Larger households may require larger flat types
      • Income ceilings may vary by flat type
      Parameters:
      user - The user to check eligibility for
      flatType - The flat type to check eligibility for
      Returns:
      true if the applicant is eligible for the flat type, false otherwise
    • canOfficerRegister

      boolean canOfficerRegister(HDBOfficer officer, Project project, Collection<OfficerRegistration> allRegistrations, Collection<Application> allApplications)
      Checks if an officer can register to work on a specific project.

      This method evaluates whether an officer should be permitted to request registration for a project, considering applications and existing registrations.

      Parameters:
      officer - The officer requesting registration
      project - The project the officer wants to register for
      allRegistrations - All existing officer registrations in the system
      allApplications - All existing applications in the system
      Returns:
      true if the officer can register for the project, false otherwise
    • checkManagerProjectHandlingEligibility

      boolean checkManagerProjectHandlingEligibility(HDBManager manager, LocalDate newProjectOpenDate, LocalDate newProjectCloseDate, Collection<Project> allExistingProjects)
      Checks if an HDB Manager is eligible to create/handle a new project based on concurrency rules. Managers can only handle one project where the application periods overlap.
      Parameters:
      manager - The manager creating/handling the project.
      newProjectOpenDate - The opening date of the project being considered.
      newProjectCloseDate - The closing date of the project being considered.
      allExistingProjects - A collection of all projects currently in the system.
      Returns:
      true if the manager can handle this new project concurrently, false otherwise.