Package com.openmeet.shared.helpers
Class ResponseHelper
java.lang.Object
com.openmeet.shared.helpers.ResponseHelper
This class contains functions that help to send responses to the client.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckStringFields(String... parameters) Checks if all the parameters are initialized.static voidsendCustomError(PrintWriter out, String value) Sends a custom error message to the client.static voidsendCustomSuccess(PrintWriter out, String value) Sends a generic success message to the client.static voidSends a generic error message to the client.static voidsendGenericResponse(PrintWriter out, HashMap<String, String> pairs) Sends a generic response message to the client.
-
Constructor Details
-
ResponseHelper
public ResponseHelper()
-
-
Method Details
-
checkStringFields
Checks if all the parameters are initialized.- Parameters:
parameters- The parameters to control.- Returns:
- The result of the check.
-
sendGenericError
Sends a generic error message to the client.- Parameters:
out- The Writer with which the response will be sent.
-
sendCustomError
Sends a custom error message to the client.- Parameters:
out- The Writer with which the response will be sent.
-
sendCustomSuccess
Sends a generic success message to the client.- Parameters:
out- The Writer with which the response will be sent.
-
sendGenericResponse
Sends a generic response message to the client.- Parameters:
out- The Writer with which the response will be sent.
-