Class ResponseHelper

java.lang.Object
com.openmeet.shared.helpers.ResponseHelper

public class ResponseHelper extends Object
This class contains functions that help to send responses to the client.
  • Constructor Details

    • ResponseHelper

      public ResponseHelper()
  • Method Details

    • checkStringFields

      public static boolean checkStringFields(String... parameters)
      Checks if all the parameters are initialized.
      Parameters:
      parameters - The parameters to control.
      Returns:
      The result of the check.
    • sendGenericError

      public static void sendGenericError(PrintWriter out)
      Sends a generic error message to the client.
      Parameters:
      out - The Writer with which the response will be sent.
    • sendCustomError

      public static void sendCustomError(PrintWriter out, String value)
      Sends a custom error message to the client.
      Parameters:
      out - The Writer with which the response will be sent.
    • sendCustomSuccess

      public static void sendCustomSuccess(PrintWriter out, String value)
      Sends a generic success message to the client.
      Parameters:
      out - The Writer with which the response will be sent.
    • sendGenericResponse

      public static void sendGenericResponse(PrintWriter out, HashMap<String,String> pairs)
      Sends a generic response message to the client.
      Parameters:
      out - The Writer with which the response will be sent.