Module sc2002_fypms
Package utils

Class RequestViewUtils


  • public class RequestViewUtils
    extends java.lang.Object
    The RequestViewUtils class provides utility methods for displaying request-related information, such as request header, sender/receiver info, and request history.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void printReceiverInfo​(User receiver)
      Prints information about the receiver of the request, including their user ID, name, and email.
      static void printRequestHeader​(Request request, java.lang.String requestTypeString)
      Prints the header for a request, including its ID, type, and status.
      static void printRequestHistory​(Request request)
      Prints the history of a request.
      static void printSenderInfo​(User sender)
      Prints information about the sender of the request, including their user ID, name, and email.
      static void printSubHeader​(java.lang.String subHeader)
      Prints a subheader for a specific section of the request display.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RequestViewUtils

        public RequestViewUtils()
        Constructs an instance of the RequestViewUtils class.
    • Method Detail

      • printRequestHeader

        public static void printRequestHeader​(Request request,
                                              java.lang.String requestTypeString)
        Prints the header for a request, including its ID, type, and status.
        Parameters:
        request - the request object to be displayed
        requestTypeString - a string representation of the request type
      • printSubHeader

        public static void printSubHeader​(java.lang.String subHeader)
        Prints a subheader for a specific section of the request display.
        Parameters:
        subHeader - the title of the subheader
      • printSenderInfo

        public static void printSenderInfo​(User sender)
        Prints information about the sender of the request, including their user ID, name, and email.
        Parameters:
        sender - the sender user object
      • printReceiverInfo

        public static void printReceiverInfo​(User receiver)
        Prints information about the receiver of the request, including their user ID, name, and email.
        Parameters:
        receiver - the receiver user object
      • printRequestHistory

        public static void printRequestHistory​(Request request)
        Prints the history of a request.
        Parameters:
        request - the request object with its history