public class RegExpExclusionFilterFactory extends Object implements org.archive.wayback.accesscontrol.ExclusionFilterFactory
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.
Constructor and Description |
---|
RegExpExclusionFilterFactory() |
Modifier and Type | Method and Description |
---|---|
org.archive.wayback.resourceindex.filters.ExclusionFilter |
get() |
File |
getFile()
Get the file from which regexps are read.
|
void |
init()
Initialiser to be called from Spring framework.
|
void |
setFile(File file)
Set the file from which regexps are read.
|
void |
shutdown() |
public RegExpExclusionFilterFactory()
public void init() throws IOException, PatternSyntaxException
IOException
- if the file specifying the exclusions cannot be read.PatternSyntaxException
- if one or more of the patterns in the configuration file is an invalid java
regular expression.public void setFile(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
Copyright © 2005–2015 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.