Class RequestFactory

java.lang.Object
main.model.request.RequestFactory

public class RequestFactory extends Object
A factory class that creates a specific type of Request based on the input parameters.
  • Constructor Details

    • RequestFactory

      public RequestFactory()
  • Method Details

    • createRequest

      public static Request createRequest(Map<String,String> map)
      Creates a Request object based on the input parameters.
      Parameters:
      map - a Map of key-value pairs representing the parameters of the Request
      Returns:
      a Request object of the specified type
      Throws:
      IllegalArgumentException - if the RequestType is not valid or if the input parameters are not valid for the specified RequestType