Class VaultTransformEncodeResult
java.lang.Object
org.springframework.vault.support.AbstractResult<TransformCiphertext>
org.springframework.vault.support.VaultTransformEncodeResult
Holds the response from encryption operation and provides methods to access the result.
- Since:
- 2.3
- Author:
- Lauren Voswinkel
-
Constructor Summary
ConstructorDescriptionVaultTransformEncodeResult
(TransformCiphertext cipherText) CreateVaultTransformEncodeResult
for a successfully encryptedTransformCiphertext
.VaultTransformEncodeResult
(VaultException exception) CreateVaultTransformEncodeResult
for an error during encryption. -
Method Summary
Modifier and TypeMethodDescriptionprotected TransformCiphertext
get0()
Return the result asString
or throw aVaultException
if the operation completed with an error.Methods inherited from class org.springframework.vault.support.AbstractResult
get, getCause, isSuccessful
-
Constructor Details
-
VaultTransformEncodeResult
CreateVaultTransformEncodeResult
for a successfully encryptedTransformCiphertext
.- Parameters:
cipherText
- must not be null.
-
VaultTransformEncodeResult
CreateVaultTransformEncodeResult
for an error during encryption.- Parameters:
exception
- must not be null.
-
-
Method Details
-
get0
- Specified by:
get0
in classAbstractResult<TransformCiphertext>
- Returns:
- the actual result if this result completed successfully.
-
getAsString
Return the result asString
or throw aVaultException
if the operation completed with an error. UseAbstractResult.isSuccessful()
to verify the success status of this result without throwing an exception.- Returns:
- the result value.
- Throws:
VaultException
- if the operation completed with an error.
-