Class PossibleValuesSpecUtils

java.lang.Object
com.kingsrook.qqq.middleware.javalin.specs.v1.utils.PossibleValuesSpecUtils

public class PossibleValuesSpecUtils extends Object
Shared utilities for possible values spec definitions.
  • Constructor Details

    • PossibleValuesSpecUtils

      public PossibleValuesSpecUtils()
  • Method Details

    • defineRequestBody

      public static RequestBody defineRequestBody()
      Build the shared request body schema used by all possible values endpoints.
    • extractStringField

      public static String extractStringField(org.json.JSONObject requestBody, String fieldName)
      Extract a string field from the JSON request body.
    • extractIdList

      public static List<String> extractIdList(org.json.JSONObject requestBody)
      Extract the id list from the JSON request body. Accepts an array of strings or numbers, or a comma-separated string (like the legacy query parameter).
    • extractLabelList

      public static List<String> extractLabelList(org.json.JSONObject requestBody)
      Extract the label list from the JSON request body (an array, or a comma-separated string).
    • extractOtherValues

      public static Map<String,Serializable> extractOtherValues(org.json.JSONObject requestBody)
      Extract other values map from the JSON request body.
    • extractProcessValues

      public static Map<String,Serializable> extractProcessValues(org.json.JSONObject requestBody)
      Extract process values map from the JSON request body.
    • applyPickerRequest

      public static void applyPickerRequest(org.json.JSONObject requestBody, PossibleValuesInput input)
      Read the record picker request (the body's "picker" object), if any.