Class VaultUtil

  • public final class VaultUtil
    extends Object
    Utility class for Vault API.
    • Method Detail

      • arrayToList

        public static List<String> arrayToList​(JsonArray array)
        Create a list of strings from JSON array.
        array - array to process
        each element from the array as a string
      • processListDataResponse

        public static List<String> processListDataResponse​(JsonObject response)
        Process response from LIST operations. Finds the data object, and processes the keys array.
        response - JSON response from API LIST call
        keys as a list of strings
      • toMap

        public static Map<String,​String> toMap​(JsonObject object,
                                                     String name)
        Return a map of a json object that is nested in the provided object. If the name is nil or not present, returns an empty map.
        object - JSON object to process
        name - name of a nested JSON object to return as a map
        map representation of the nested object