Class VaultDecryptionResult
java.lang.Object
org.springframework.vault.support.AbstractResult<Plaintext>
org.springframework.vault.support.VaultDecryptionResult
Holds the response from decryption operation and provides methods to access the result.
- Since:
- 1.1
- Author:
- Praveendra Singh, Mark Paluch
-
Constructor Summary
ConstructorDescriptionVaultDecryptionResult
(Plaintext plaintext) CreateVaultDecryptionResult
for a successfully decryptedPlaintext
.VaultDecryptionResult
(VaultException exception) CreateVaultDecryptionResult
for an error during decryption. -
Method Summary
Modifier and TypeMethodDescriptionprotected Plaintext
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
-
VaultDecryptionResult
CreateVaultDecryptionResult
for a successfully decryptedPlaintext
.- Parameters:
plaintext
- must not be null.
-
VaultDecryptionResult
CreateVaultDecryptionResult
for an error during decryption.- Parameters:
exception
- must not be null.
-
-
Method Details
-
get0
- Specified by:
get0
in classAbstractResult<Plaintext>
- 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.
-