Class AppUtils

java.lang.Object
gov.niem.tools.api.core.utils.AppUtils

public class AppUtils extends Object
General utility functions for the application.
  • Constructor Details

    • AppUtils

      public AppUtils()
  • Method Details

    • log

      public static String log(String message)
      Logs the given message.
    • log

      public static String log(String messageBase, String label)
      Logs the given arguments as a formatted message.
    • getResponseOkString

      public static org.springframework.http.ResponseEntity<String> getResponseOkString(String message)
      Returns an OK plain text response.
    • getResponseOkJson

      public static org.springframework.http.ResponseEntity<String> getResponseOkJson(String message)
      Returns an OK JSON response.
    • getResponseUnprocessableString

      public static org.springframework.http.ResponseEntity<String> getResponseUnprocessableString(String message)
      Returns an Unprocessable Entity plain text response.
    • getTimestamp

      public static String getTimestamp()
      Gets the current date and time with formatting.