Class Applicant

All Implemented Interfaces:
Serializable, Comparable<Object>, Principal, EMailAddress, FormattedEMailRecipient, IDBean, ViewEntry, Cacheable

public class Applicant extends Person
A class for storing Applicant entries.
Since:
1.0
Version:
11.0
Author:
Luke
See Also:
  • Constructor Details

    • Applicant

      public Applicant(String firstName, String lastName)
      Create an Applicant object with a given first and last name, converted to "proper case".
      Parameters:
      firstName - the Applicant's first (given) name
      lastName - the Applicant's last (family) name
      Throws:
      NullPointerException - if either name is null
      See Also:
  • Method Details

    • getStatus

      public ApplicantStatus getStatus()
      Returns the Applicant's status.
      Returns:
      an ApplicantStatus enum
    • getLegacyURL

      public String getLegacyURL()
      Returns the URL for legacy hours verification.
      Returns:
      the URL for legacy hours verification, null if not available
      See Also:
    • getLegacyVerified

      public boolean getLegacyVerified()
      Returns legacy hours verification status.
      Returns:
      TRUE if legacy hours have been verified
      See Also:
    • getAutoReject

      public boolean getAutoReject()
      Returns if this Applicant was automatically rejected due to CAPTCHA issues.
      Returns:
      TRUE if automatically rejected, otherwise FALSE
      See Also:
    • getPilotID

      public int getPilotID()
      Returns the Database ID of this Applicant's Pilot record.
      Returns:
      the Database ID if hired as a Pilot
      See Also:
    • getComments

      public String getComments()
      Returns any additional Applicant comments.
      Returns:
      the comments
      See Also:
    • getHRComments

      public String getHRComments()
      Returns any HR comments.
      Returns:
      the comments
      See Also:
    • getRegisterHostName

      public String getRegisterHostName()
      Returns the host name this Applicant registered from.
      Returns:
      the host name
      See Also:
    • getRegisterAddress

      public String getRegisterAddress()
      Returns the address this Applicant registered from.
      Returns:
      the IP address
      See Also:
    • getHasCAPTCHA

      public boolean getHasCAPTCHA()
      Returns whether the CAPTCHA has been verified.
      Returns:
      TRUE if CAPTCHA verified, otherwise FALSE
      See Also:
    • getSimVersion

      public Simulator getSimVersion()
      Returns the Simulator preferred by this Applicant.
      Returns:
      the Simulator
      See Also:
    • addHRComment

      public void addHRComment(String c)
      Appends an HR comment to this Applicant.
      Parameters:
      c - the comment
    • setLegacyURL

      public void setLegacyURL(String url)
      Sets the URL for legacy hours verification
      Parameters:
      url - the URL for legacy hours verification
      See Also:
    • setLegacyVerified

      public void setLegacyVerified(boolean verified)
      Sets the legacy hours verification flag.
      Parameters:
      verified - TRUE if hours have been verified, FALSE otherwise
      See Also:
    • setAutoReject

      public void setAutoReject(boolean isAutoReject)
      Updates whether this Applicant was automatically rejected due to CAPTCHA issues.
      Parameters:
      isAutoReject - TRUE if automatically rejected, otherwise FALSE
      See Also:
    • setTypeChoice

      public void setTypeChoice(int stage, String eqName)
      Sets the preferred equipment program for a stage.
      Parameters:
      stage - the stage number
      eqName - the equipment program
    • setSimVersion

      public void setSimVersion(Simulator s)
      Set the Simulator used by this Applicant.
      Parameters:
      s - the Simulator
      See Also:
    • setRegisterHostName

      public void setRegisterHostName(String hostName)
      Sets the host name this Applicant registered from.
      Parameters:
      hostName - the host name
      See Also:
    • setRegisterAddress

      public void setRegisterAddress(String addr)
      Sets the remote address this Applicant registered from.
      Parameters:
      addr - the IP address
      See Also:
    • setComments

      public void setComments(String comments)
      Updates the Applicant comments.
      Parameters:
      comments - the comments
      See Also:
    • setHRComments

      public void setHRComments(String comments)
      Updates the HR comments.
      Parameters:
      comments - the comments
      See Also:
    • setPilotID

      public void setPilotID(int pilotID)
      Updates the Database ID of this Applicant's Pilot record.
      Parameters:
      pilotID - the database ID, if hired as a Pilot
      Throws:
      IllegalArgumentException - if pilotID is negative
      IllegalStateException - if the Applicant has not been Approved
      See Also:
    • setStatus

      public void setStatus(ApplicantStatus s)
      Updates the Applicant's status.
      Parameters:
      s - an ApplicantStatus
    • setHasCAPTCHA

      public void setHasCAPTCHA(boolean hasCaptchaVerified)
      Updates whether this Applicant has passed tha CAPTCHA check.
      Parameters:
      hasCaptchaVerified - TRUE if CAPTCHA verified, othersie FALSE
    • addRole

      public void addRole(String roleName)
      Description copied from class: Person
      Add a security role to the Person's list of roles.
      Specified by:
      addRole in class Person
      Parameters:
      roleName - the name of the role
    • isInRole

      public boolean isInRole(String roleName)
      Description copied from class: Person
      Queries if a Person is a member of a particular role.
      Specified by:
      isInRole in class Person
      Parameters:
      roleName - the role name
      Returns:
      TRUE if the Person is a member of this role, otherwise FALSE
    • getRoles

      public Collection<String> getRoles()
      Description copied from class: Person
      Returns a list of security roles this Person belongs to.
      Specified by:
      getRoles in class Person
      Returns:
      a Collection of role names
    • getTypeChoices

      public Map<Long,String> getTypeChoices()
      Returns the stage equipment type choices.
      Returns:
      a Map of choices, keyed by stage
    • getRowClassName

      public String getRowClassName()
      Description copied from interface: ViewEntry
      Returns the CSS class for this object if rendered in a view table.
      Returns:
      the CSS class name, or NULL if none