Package org.apache.tika.parser
Class SimplePasswordProvider
java.lang.Object
org.apache.tika.parser.SimplePasswordProvider
- All Implemented Interfaces:
Serializable,PasswordProvider
A simple
PasswordProvider that returns a configured password
for all documents. This can be configured via JSON in the parseContext:
{
"parseContext": {
"simple-password-provider": {
"password": "secret"
}
}
}
- Since:
- Apache Tika 4.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPassword(Metadata metadata) Looks up the password for a document with the given metadata, and returns it for the Parser.voidsetPassword(String password)
-
Constructor Details
-
SimplePasswordProvider
public SimplePasswordProvider() -
SimplePasswordProvider
-
-
Method Details
-
getPassword
Description copied from interface:PasswordProviderLooks up the password for a document with the given metadata, and returns it for the Parser. If no password is available for the document, will return null.- Specified by:
getPasswordin interfacePasswordProvider- Parameters:
metadata- document metadata- Returns:
- The document decryption password, or
nullif not known
-
getPassword
-
setPassword
-