|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.solr.handler.extraction.RegexRulesPasswordProvider
public class RegexRulesPasswordProvider
Password provider for Extracting request handler which finds correct password based on file name matching against a list of regular expressions. The list of passwords is supplied in an optional Map. If an explicit password is set, it will be used.
Constructor Summary | |
---|---|
RegexRulesPasswordProvider()
|
Method Summary | |
---|---|
String |
getExplicitPassword()
Gets the explicit password, if set |
String |
getPassword(org.apache.tika.metadata.Metadata meta)
|
LinkedHashMap<Pattern,String> |
getPasswordMap()
|
void |
parse(InputStream is)
Initialize rules through file input stream. |
static LinkedHashMap<Pattern,String> |
parseRulesFile(InputStream is)
Parses rule file from stream and returns a Map of all rules found |
void |
resetExplicitPassword()
Resets explicit password, so that map will be used for lookups |
void |
setExplicitPassword(String explicitPassword)
Sets an explicit password which will be used instead of password map |
void |
setPasswordMap(LinkedHashMap<Pattern,String> linkedHashMap)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegexRulesPasswordProvider()
Method Detail |
---|
public String getPassword(org.apache.tika.metadata.Metadata meta)
getPassword
in interface org.apache.tika.parser.PasswordProvider
public static LinkedHashMap<Pattern,String> parseRulesFile(InputStream is)
is
- input stream for the filepublic void parse(InputStream is)
is
- the input stream with rules file, one line per rule on format regex=passwordpublic LinkedHashMap<Pattern,String> getPasswordMap()
public void setPasswordMap(LinkedHashMap<Pattern,String> linkedHashMap)
public String getExplicitPassword()
public void setExplicitPassword(String explicitPassword)
explicitPassword
- the password to usepublic void resetExplicitPassword()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |