Package gov.niem.tools.api.core.utils
Class AppUtils
java.lang.Object
gov.niem.tools.api.core.utils.AppUtils
General utility functions for the application.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.springframework.http.ResponseEntity
<String> getResponseOkJson
(String message) Returns an OK JSON response.static org.springframework.http.ResponseEntity
<String> getResponseOkString
(String message) Returns an OK plain text response.static org.springframework.http.ResponseEntity
<String> getResponseUnprocessableString
(String message) Returns an Unprocessable Entity plain text response.static String
Gets the current date and time with formatting.static String
Logs the given message.static String
Logs the given arguments as a formatted message.
-
Constructor Details
-
AppUtils
public AppUtils()
-
-
Method Details
-
log
Logs the given message. -
log
Logs the given arguments as a formatted message. -
getResponseOkString
Returns an OK plain text response. -
getResponseOkJson
Returns an OK JSON response. -
getResponseUnprocessableString
public static org.springframework.http.ResponseEntity<String> getResponseUnprocessableString(String message) Returns an Unprocessable Entity plain text response. -
getTimestamp
Gets the current date and time with formatting.
-