|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.archive.crawler.admin.ui.JobConfigureUtils
public class JobConfigureUtils
Utility methods used configuring jobs in the admin UI. Methods are mostly called by the admin UI jsp.
Field Summary | |
---|---|
static java.lang.String |
ACTION
|
static java.lang.String |
FILTERS
|
static java.lang.String |
SUBACTION
|
Constructor Summary | |
---|---|
JobConfigureUtils()
|
Method Summary | |
---|---|
protected static void |
checkAttribute(ModuleAttributeInfo att,
ComplexType mbean,
CrawlerSettings settings,
javax.servlet.http.HttpServletRequest request,
boolean expert)
Process passed attribute. |
static CrawlJob |
checkCrawlJob(CrawlJob job,
javax.servlet.http.HttpServletResponse response,
java.lang.String redirectBasePath,
java.lang.String currDomain)
Check passed job is not null and not readonly. |
protected static CrawlJob |
getAndCheckJob(CrawlJob job,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Check passed crawljob CrawlJob setting. |
protected static java.io.File |
getSeedFile(SettingsHandler hndlr)
|
protected static java.io.InputStream |
getSeedStream(SettingsHandler hndlr)
Return seeds as a stream. |
static CrawlJob |
handleJobAction(CrawlJobHandler handler,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String redirectBasePath,
java.lang.String currDomain,
java.lang.String reference)
Handle job action. |
static void |
printOutSeeds(SettingsHandler hndlr,
java.lang.String payload)
Print complete seeds list on passed in PrintWriter. |
static void |
printOutSeeds(SettingsHandler hndlr,
java.io.Writer out)
Print complete seeds list on passed in PrintWriter. |
static boolean |
seedsEdittableSize(SettingsHandler h)
Test whether seeds file is of a size that's reasonable to edit in an HTML textarea. |
protected static void |
writeAttribute(java.lang.String attName,
java.lang.String attAbsoluteName,
ComplexType mbean,
CrawlerSettings settings,
java.lang.Object value)
Write out attribute. |
static void |
writeNewOrderFile(ComplexType mbean,
CrawlerSettings settings,
javax.servlet.http.HttpServletRequest request,
boolean expert)
This methods updates a ComplexType with information passed to it by a HttpServletRequest. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ACTION
public static final java.lang.String SUBACTION
public static final java.lang.String FILTERS
Constructor Detail |
---|
public JobConfigureUtils()
Method Detail |
---|
protected static CrawlJob getAndCheckJob(CrawlJob job, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
job
- Current CrawlJobHandler.request
- Http request.response
- Http response.
public static void writeNewOrderFile(ComplexType mbean, CrawlerSettings settings, javax.servlet.http.HttpServletRequest request, boolean expert)
mbean
- The ComplexType to updatesettings
- CrawlerSettings for the domain to override setting for. null
denotes the global settings.request
- The HttpServletRequest to use to update the ComplexTypeexpert
- if true expert settings will be updated, otherwise they will
be ignored.protected static void checkAttribute(ModuleAttributeInfo att, ComplexType mbean, CrawlerSettings settings, javax.servlet.http.HttpServletRequest request, boolean expert)
att
- Attribute to process.mbean
- The ComplexType to updatesettings
- CrawlerSettings for the domain to override setting for. null
denotes the global settings.request
- The HttpServletRequest to use to update the ComplexTypeexpert
- if true expert settings will be updated, otherwise they will
be ignored.protected static void writeAttribute(java.lang.String attName, java.lang.String attAbsoluteName, ComplexType mbean, CrawlerSettings settings, java.lang.Object value)
attName
- Attribute short name.attAbsoluteName
- Attribute full name.mbean
- The ComplexType to updatesettings
- CrawlerSettings for the domain to override setting for. null
denotes the global settings.value
- Value to set into the attribute.public static CrawlJob checkCrawlJob(CrawlJob job, javax.servlet.http.HttpServletResponse response, java.lang.String redirectBasePath, java.lang.String currDomain) throws java.io.IOException
job
- Job to check.response
- Http response.redirectBasePath
- Full path for where to go next if an error.currDomain
- May be null.
E.g. "/admin/jobs/per/overview.jsp".
java.io.IOException
public static CrawlJob handleJobAction(CrawlJobHandler handler, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String redirectBasePath, java.lang.String currDomain, java.lang.String reference) throws java.io.IOException, javax.management.AttributeNotFoundException, java.lang.reflect.InvocationTargetException, javax.management.InvalidAttributeValueException
handler
- CrawlJobHandler to operate on.request
- Http request.response
- Http response.redirectBasePath
- Full path for where to go next if an error.
E.g. "/admin/jobs/per/overview.jsp".currDomain
- Current domain. Pass null for global domain.reference
-
java.io.IOException
javax.management.AttributeNotFoundException
java.lang.reflect.InvocationTargetException
javax.management.InvalidAttributeValueException
public static void printOutSeeds(SettingsHandler hndlr, java.lang.String payload) throws javax.management.AttributeNotFoundException, javax.management.MBeanException, javax.management.ReflectionException, java.io.IOException
hndlr
- Current handler.payload
- What to write out.
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException
java.io.IOException
java.io.IOException
public static void printOutSeeds(SettingsHandler hndlr, java.io.Writer out) throws javax.management.AttributeNotFoundException, javax.management.MBeanException, javax.management.ReflectionException, java.io.IOException
hndlr
- Current handler.out
- Writer to write out all seeds to.
javax.management.ReflectionException
javax.management.MBeanException
javax.management.AttributeNotFoundException
java.io.IOException
public static boolean seedsEdittableSize(SettingsHandler h) throws javax.management.AttributeNotFoundException, javax.management.MBeanException, javax.management.ReflectionException
h
- current settingsHandler
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException
protected static java.io.File getSeedFile(SettingsHandler hndlr) throws javax.management.AttributeNotFoundException, javax.management.MBeanException, javax.management.ReflectionException
hndlr
- Settings handler.
javax.management.ReflectionException
javax.management.MBeanException
javax.management.AttributeNotFoundException
protected static java.io.InputStream getSeedStream(SettingsHandler hndlr) throws java.io.IOException, javax.management.AttributeNotFoundException, javax.management.MBeanException, javax.management.ReflectionException
hndlr
- SettingsHandler. Used to find seeds.txt file.
java.io.IOException
javax.management.ReflectionException
javax.management.MBeanException
javax.management.AttributeNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |