Package io.helidon.integrations.vault
Class VaultRequest<T extends VaultRequest<T>>
- java.lang.Object
-
- io.helidon.integrations.common.rest.ApiJsonBuilder<T>
-
- io.helidon.integrations.common.rest.ApiJsonRequest<T>
-
- io.helidon.integrations.vault.VaultRequest<T>
-
- Type Parameters:
T
- type of the subclass
- All Implemented Interfaces:
ApiRequest<T>
- Direct Known Subclasses:
CaCertificateGet.Request
,CertificateGet.Request
,ConfigureK8s.Request
,CreateAppRole.Request
,CreateCubbyhole.Request
,CreateKey.Request
,CreateKv1.Request
,CreateKv2.Request
,CreatePolicy.Request
,CreateRole.Request
,CreateToken.Request
,CreateTokenRole.Request
,CrlGet.Request
,DbConfigure.Request
,DbCreateRole.Request
,DbDelete.Request
,DbDeleteRole.Request
,DbGet.Request
,Decrypt.Request
,DecryptBatch.Request
,DeleteAllKv2.Request
,DeleteAppRole.Request
,DeleteCubbyhole.Request
,DeleteKey.Request
,DeleteKv1.Request
,DeleteKv2.Request
,DeletePolicy.Request
,DeleteRole.Request
,DeleteTokenRole.Request
,DestroyKv2.Request
,DestroySecretId.Request
,DisableAuth.Request
,DisableEngine.Request
,EnableAuth.Request
,EnableEngine.Request
,Encrypt.Request
,EncryptBatch.Request
,GenerateSecretId.Request
,GenerateSelfSignedRoot.Request
,GetCubbyhole.Request
,GetKv1.Request
,GetKv2.Request
,Hmac.Request
,IssueCertificate.Request
,ListSecrets.Request
,Login.Request
,Login.Request
,PkiRole.Request
,ReadRoleId.Request
,RenewToken.Request
,RevokeAndOrphanToken.Request
,RevokeCertificate.Request
,RevokeToken.Request
,Sign.Request
,SignCsr.Request
,UndeleteKv2.Request
,UpdateCubbyhole.Request
,UpdateKeyConfig.Request
,UpdateKv1.Request
,UpdateKv2.Request
,Verify.Request
public abstract class VaultRequest<T extends VaultRequest<T>> extends ApiJsonRequest<T>
Common helper methods for Vault Requests.
-
-
Constructor Summary
Constructors Constructor Description VaultRequest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description T
add(String name, Duration duration)
Add a duration formatted in Vault manner, as a string with duration.protected static void
addCommaDelimitedArray(JsonObjectBuilder json, String name, List<String> values)
Add aa list of values as a comma delimited string instead of a JSON Array.T
addToCommaDelimitedArray(String name, String element)
Add a string to an array represented as a comma delimited string in the request JSON.static String
durationToTtl(Duration duration)
Duration to time to live in HCP Vault format.protected void
preBuild(JsonBuilderFactory factory, JsonObjectBuilder payload)
Called before adding properties defined in this request.-
Methods inherited from class io.helidon.integrations.common.rest.ApiJsonRequest
addHeader, addQueryParam, headers, queryParams, requestId, requestId, requestMediaType, requestMediaType, responseMediaType, responseMediaType
-
Methods inherited from class io.helidon.integrations.common.rest.ApiJsonBuilder
add, add, add, add, add, add, addBase64, addToArray, addToArray, addToArray, addToArray, addToArray, addToArray, addToObject, addToObject, addToObject, addToObject, addToObject, emptyArray, me, postBuild, toJson
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.helidon.integrations.common.rest.ApiRequest
toJson
-
-
-
-
Method Detail
-
addCommaDelimitedArray
protected static void addCommaDelimitedArray(JsonObjectBuilder json, String name, List<String> values)
Add aa list of values as a comma delimited string instead of a JSON Array.- Parameters:
json
- the buildername
- name of the propertyvalues
- list of values
-
add
public T add(String name, Duration duration)
Add a duration formatted in Vault manner, as a string with duration.- Parameters:
name
- name of the propertyduration
- duration to add- Returns:
- updated request
-
addToCommaDelimitedArray
public T addToCommaDelimitedArray(String name, String element)
Add a string to an array represented as a comma delimited string in the request JSON.- Parameters:
name
- key in the json payloadelement
- element of the array- Returns:
- updated request
-
preBuild
protected void preBuild(JsonBuilderFactory factory, JsonObjectBuilder payload)
Description copied from class:ApiJsonBuilder
Called before adding properties defined in this request.- Overrides:
preBuild
in classApiJsonBuilder<T extends VaultRequest<T>>
- Parameters:
factory
- json factorypayload
- payload builder
-
-