Package dk.netarkivet.heritrix3.monitor
Class NASEnvironment
- java.lang.Object
-
- dk.netarkivet.heritrix3.monitor.NASEnvironment
-
public class NASEnvironment extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NASEnvironment.StringMatcher
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
contextPath
java.lang.String
h3AdminName
java.lang.String
h3AdminPassword
java.util.List<NASEnvironment.StringMatcher>
h3HostPortAllowRegexList
Heritrix3JobMonitorThread
h3JobMonitorThread
HttpLocaleHandler
httpLocaleUtils
I18n
I18N
protected java.lang.String
login_template_name
protected com.antiaction.common.templateengine.login.LoginTemplateHandler<NASUser>
loginHandler
java.lang.String
NAS_GROOVY_SCRIPT
static java.lang.String
servicePath
protected javax.servlet.ServletConfig
servletConfig
servletConfig.com.antiaction.common.templateengine.TemplateMaster
templateMaster
java.io.File
tempPath
-
Constructor Summary
Constructors Constructor Description NASEnvironment(javax.servlet.ServletContext servletContext, javax.servlet.ServletConfig theServletConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanup()
Do some cleanup.java.util.stream.Stream<java.lang.String>
getCrawledUrls(long jobId, Heritrix3JobMonitor h3Job)
Get the (attempted) crawled URLs of the crawllog for the running job with the given job idjava.lang.String
getResourceAsString(java.lang.String resource)
boolean
isH3HostnamePortEnabled(java.lang.String h3HostnamePort)
boolean
jobHarvestsDomain(long jobId, java.lang.String domainName, Heritrix3JobMonitor h3Job)
Find out whether the given job harvests given domain.void
replaceH3HostnamePortRegexList(java.util.List<java.lang.String> h3HostnamePortRegexList, java.util.List<java.lang.String> invalidPatternsList)
void
start()
-
-
-
Field Detail
-
NAS_GROOVY_SCRIPT
public java.lang.String NAS_GROOVY_SCRIPT
-
servletConfig
protected javax.servlet.ServletConfig servletConfig
servletConfig.
-
templateMaster
public com.antiaction.common.templateengine.TemplateMaster templateMaster
-
login_template_name
protected java.lang.String login_template_name
-
loginHandler
protected com.antiaction.common.templateengine.login.LoginTemplateHandler<NASUser> loginHandler
-
tempPath
public java.io.File tempPath
-
h3AdminName
public java.lang.String h3AdminName
-
h3AdminPassword
public java.lang.String h3AdminPassword
-
h3JobMonitorThread
public Heritrix3JobMonitorThread h3JobMonitorThread
-
contextPath
public static java.lang.String contextPath
-
servicePath
public static java.lang.String servicePath
-
httpLocaleUtils
public HttpLocaleHandler httpLocaleUtils
-
h3HostPortAllowRegexList
public final java.util.List<NASEnvironment.StringMatcher> h3HostPortAllowRegexList
-
-
Constructor Detail
-
NASEnvironment
public NASEnvironment(javax.servlet.ServletContext servletContext, javax.servlet.ServletConfig theServletConfig) throws javax.servlet.ServletException
- Throws:
javax.servlet.ServletException
-
-
Method Detail
-
getResourceAsString
public java.lang.String getResourceAsString(java.lang.String resource) throws java.io.IOException
- Throws:
java.io.IOException
-
start
public void start()
-
cleanup
public void cleanup()
Do some cleanup. This waits for the different workflow threads to stop running.
-
replaceH3HostnamePortRegexList
public void replaceH3HostnamePortRegexList(java.util.List<java.lang.String> h3HostnamePortRegexList, java.util.List<java.lang.String> invalidPatternsList)
-
isH3HostnamePortEnabled
public boolean isH3HostnamePortEnabled(java.lang.String h3HostnamePort)
-
getCrawledUrls
public java.util.stream.Stream<java.lang.String> getCrawledUrls(long jobId, Heritrix3JobMonitor h3Job)
Get the (attempted) crawled URLs of the crawllog for the running job with the given job id- Parameters:
jobId
- Id of the running jobh3Job
- Heritrix3JobMonitor from which to get the job for the given jobId- Returns:
- The (attempted) crawled URLs of the crawllog for given job
-
jobHarvestsDomain
public boolean jobHarvestsDomain(long jobId, java.lang.String domainName, Heritrix3JobMonitor h3Job)
Find out whether the given job harvests given domain.- Parameters:
jobId
- The jobdomainName
- The domain- Returns:
- whether the given job harvests given domain
-
-