Package com.exedio.cope.vault
Class VaultNotFoundException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.exedio.cope.vault.VaultNotFoundException
-
- All Implemented Interfaces:
Serializable
public final class VaultNotFoundException extends Exception
Signals, that an attempt to fetch data by its hash from aVaultService
failed because for this hash nothing wasput
to the service before.Is thrown for valid hashes only, i.e. hashes for which the service could store data. Should not be thrown for invalid hashes, such as hashes which are either too short or too long or which do contain invalid (non-hex) characters. Must not be thrown for any other error, such as IO errors, authentication failures etc.
- Author:
- Ralf Wiebicke
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description VaultNotFoundException(String hash)
VaultNotFoundException(String hash, Throwable cause)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static String
anonymiseHash(String hash)
String
getHash()
Deprecated.UsegetHashComplete()
insteadString
getHashAnonymous()
String
getHashComplete()
Consider usinggetHashAnonymous()
instead to avoid leaking sensitive data.String
getMessage()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
getHash
@Deprecated @Nonnull public String getHash()
Deprecated.UsegetHashComplete()
instead
-
getHashComplete
@Nonnull public String getHashComplete()
Consider usinggetHashAnonymous()
instead to avoid leaking sensitive data. Hashes may be one of the access control keys for the data hashed - so putting hashes into log files etc. may be dangerous.
-
getMessage
public String getMessage()
- Overrides:
getMessage
in classThrowable
-
-