dk.netarkivet.harvester.webinterface
Class EventHarvest

java.lang.Object
  extended by dk.netarkivet.harvester.webinterface.EventHarvest

public final class EventHarvest
extends java.lang.Object

Contains utility methods for supporting event harvest GUI.


Field Summary
(package private) static org.apache.commons.logging.Log log
           
 
Method Summary
static void addConfigurations(javax.servlet.jsp.PageContext context, I18n i18n, PartialHarvest eventHarvest)
          Adds a bunch of configurations to a given PartialHarvest.
static void addConfigurationsFromSeedsFile(javax.servlet.jsp.PageContext context, I18n i18n, PartialHarvest eventHarvest, java.lang.String seeds, java.lang.String maxbytesString, java.lang.String maxobjectsString, java.lang.String maxrateString, java.lang.String ordertemplate)
          Add configurations to an existing selective harvest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

static final org.apache.commons.logging.Log log
Method Detail

addConfigurations

public static void addConfigurations(javax.servlet.jsp.PageContext context,
                                     I18n i18n,
                                     PartialHarvest eventHarvest)
Adds a bunch of configurations to a given PartialHarvest. For full definitions of the parameters, see Definitions-add-event-seeds.jsp. For each seed in the list, the following steps are taken: 1) The domain is parsed out of the seed. If no such domain is known, it is created with the usual defaults. 2) For each domain, a configuration with the name <harvestDefinition>_<orderTemplate>_<maxBytes>Bytes is created unless it already exists. The configuration uses orderTemplate, and the specified maxBytes. If maxBytes is unspecified, its default value is used. The configuration is added to the harvest specified by the harvestDefinition argument. 3) For each domain, a seedlist with the name <harvestDefinition>_<orderTemplate>_<maxBytes>Bytes is created if it does not already exist and the given url is added to it. This seedlist is the only seedlist associated with the configuration of the same name.

Parameters:
context - the current JSP context
i18n - the translation information to use in this context
eventHarvest - the partial harvest to which these seeds are to be added
Throws:
ForwardedToErrorPage - If maxBytes is not a number, or if any of the seeds is badly formatted such that no domain name can be parsed from it, or if orderTemplate is not given or unknown.

addConfigurationsFromSeedsFile

public static void addConfigurationsFromSeedsFile(javax.servlet.jsp.PageContext context,
                                                  I18n i18n,
                                                  PartialHarvest eventHarvest,
                                                  java.lang.String seeds,
                                                  java.lang.String maxbytesString,
                                                  java.lang.String maxobjectsString,
                                                  java.lang.String maxrateString,
                                                  java.lang.String ordertemplate)
Add configurations to an existing selective harvest.

Parameters:
context - The current JSP context
i18n - The translation information to use in this context
eventHarvest - The partial harvest to which these seeds are to be added
seeds - The seeds as a String
maxbytesString - The given maxbytes as a string
maxobjectsString - The given maxobjects as a string
maxrateString - The given maxrate as a string (currently not used)
ordertemplate - The name of the ordertemplate to use