|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.wayback.accesscontrol.RegExpExclusionFilterFactory
public class RegExpExclusionFilterFactory
This class allows one to specify a file containing a list of regular expressions specifying url's to be blocked from access via wayback. The class is intended to be instantiated as a Spring bean in a wayback access point, for example by adding something like
<property name="exclusionFactory">
<bean class="dk.netarkivet.wayback.accesscontrol.RegExpExclusionFilterFactory" init-method="init">
<property name="file" value="/home/test/wayback_regexps.txt" />
</bean>
</property>
to an access-point definition in wayback.xml.
Field Summary | |
---|---|
(package private) java.util.Collection<java.util.regex.Pattern> |
patterns
The collection of regular expressions to be checked |
Constructor Summary | |
---|---|
RegExpExclusionFilterFactory()
|
Method Summary | |
---|---|
org.archive.wayback.resourceindex.filters.ExclusionFilter |
get()
|
java.io.File |
getFile()
Get the file from which regexps are read. |
void |
init()
Initialiser to be called from Spring framework. |
void |
setFile(java.io.File file)
Set the file from which regexps are read. |
void |
shutdown()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
java.util.Collection<java.util.regex.Pattern> patterns
Constructor Detail |
---|
public RegExpExclusionFilterFactory()
Method Detail |
---|
public void init() throws java.io.IOException, java.util.regex.PatternSyntaxException
java.io.IOException
- if the file specifying the exclusions cannot be read.
java.util.regex.PatternSyntaxException
- if one or more of the patterns in the
configuration file is an invalid java regular expression.public java.io.File getFile()
public void setFile(java.io.File file)
file
- thefile.public org.archive.wayback.resourceindex.filters.ExclusionFilter get()
get
in interface org.archive.wayback.accesscontrol.ExclusionFilterFactory
public void shutdown()
shutdown
in interface org.archive.wayback.accesscontrol.ExclusionFilterFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |