Enum Class RestApiKeyLocation
- All Implemented Interfaces:
Serializable,Comparable<RestApiKeyLocation>,Constable
Defines where an API key should be placed in REST requests.
- Since:
- 1.0
- Author:
- Bonitasoft
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAPI key is sent as an HTTP header.API key is sent as a query parameter in the URL. -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<RestApiKeyLocation>Finds a location by its key (case-insensitive).Retrieves all locations as a read-only Map.Retrieves all keys as a read-only List.Gets the description.getKey()Gets the technical key.static booleanChecks if a given string corresponds to a valid location.static RestApiKeyLocationReturns the enum constant of this class with the specified name.static RestApiKeyLocation[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HEADER
API key is sent as an HTTP header. -
QUERY_PARAM
API key is sent as a query parameter in the URL.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getKey
Gets the technical key.- Returns:
- The key
-
getDescription
Gets the description.- Returns:
- The description
-
isValid
Checks if a given string corresponds to a valid location.- Parameters:
input- The string to validate (case-insensitive)- Returns:
trueif the string is valid
-
fromKey
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
Retrieves all locations as a read-only Map.- Returns:
- A map containing all location data (Key -> Description)
-
getAllKeysList
Retrieves all keys as a read-only List.- Returns:
- A list containing all location keys
-