Enum Class RestApiKeyLocation

java.lang.Object
java.lang.Enum<RestApiKeyLocation>
com.bonitasoft.processbuilder.enums.RestApiKeyLocation
All Implemented Interfaces:
Serializable, Comparable<RestApiKeyLocation>, Constable

public enum RestApiKeyLocation extends Enum<RestApiKeyLocation>
Defines where an API key should be placed in REST requests.
Since:
1.0
Author:
Bonitasoft
  • Enum Constant Details

    • QUERY_PARAM

      public static final RestApiKeyLocation QUERY_PARAM
      API key is sent as a query parameter in the URL.
  • Method Details

    • values

      public static RestApiKeyLocation[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RestApiKeyLocation valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getKey

      public String getKey()
      Gets the technical key.
      Returns:
      The key
    • getDescription

      public String getDescription()
      Gets the description.
      Returns:
      The description
    • isValid

      public static boolean isValid(String input)
      Checks if a given string corresponds to a valid location.
      Parameters:
      input - The string to validate (case-insensitive)
      Returns:
      true if the string is valid
    • fromKey

      public static Optional<RestApiKeyLocation> fromKey(String key)
      Finds a location by its key (case-insensitive).
      Parameters:
      key - The key to search for
      Returns:
      Optional containing the matching location, or empty if not found
    • getAllData

      public static Map<String,String> getAllData()
      Retrieves all locations as a read-only Map.
      Returns:
      A map containing all location data (Key -> Description)
    • getAllKeysList

      public static List<String> getAllKeysList()
      Retrieves all keys as a read-only List.
      Returns:
      A list containing all location keys