Enum Class ApprovedStatus

java.lang.Object
java.lang.Enum<ApprovedStatus>
entity.request.ApprovedStatus
All Implemented Interfaces:
Serializable, Comparable<ApprovedStatus>, Constable

public enum ApprovedStatus extends Enum<ApprovedStatus>
Represents the approval status of a request that requires explicit approval or rejection, such as BTO applications, withdrawals, or officer registrations. This is distinct from the overall processing status (e.g., RequestStatus).
  • Enum Constant Details

    • PENDING

      public static final ApprovedStatus PENDING
      The request is awaiting review and an approval decision (e.g., by a manager).
    • SUCCESSFUL

      public static final ApprovedStatus SUCCESSFUL
      The request has been explicitly approved.
    • UNSUCCESSFUL

      public static final ApprovedStatus UNSUCCESSFUL
      The request has been explicitly rejected or deemed unsuccessful.
  • Method Details

    • values

      public static ApprovedStatus[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ApprovedStatus valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • coloredString

      public String coloredString()
      Returns a string representation of the approval status, formatted with ANSI escape codes for colored console output.
      • PENDING: Yellow
      • SUCCESSFUL: Green
      • UNSUCCESSFUL: Red
      Note: Color display depends on the console supporting ANSI escape codes.
      Returns:
      A colorized string representation of the enum constant name.