dk.netarkivet.harvester.webinterface
Class ScheduleDefinition

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

public final class ScheduleDefinition
extends java.lang.Object

Contains utility methods for creating and editing schedule definitions for harvests.


Field Summary
(package private) static java.lang.String BEGIN_AT_PARAMETER
          BeginAt parameter.
(package private) static java.lang.String COMMENTS_PARAMETERS
          Comments parameter.
(package private) static java.lang.String CONTINUE_PARAMETER
          Continue parameter.
(package private) static java.lang.String EDITION_PARAMETER
          Edition parameter.
(package private) static java.lang.String END_HARVEST_TIME_PARAMETER
          EndHarvestTime parameter.
(package private) static java.lang.String FIRST_HARVEST_TIME_PARAMETER
          FirsrHarvestTime parameter.
(package private) static java.lang.String FREQUENCY_DATE_PARAMETER
          Frequency defined by date parameter.
(package private) static java.lang.String FREQUENCY_DAY_PARAMETER
          Frequency defined by day parameter.
(package private) static java.lang.String FREQUENCY_HOURS_PARAMETER
          Frequency in hours parameter.
(package private) static java.lang.String FREQUENCY_MINUTES_PARAMETER
          Frequency in minutes parameter.
(package private) static java.lang.String FREQUENCY_PARAMETER
          Frequency parameter.
(package private) static java.lang.String HARVEST_TIME_PARAMETER
          HarvestTime parameter.
(package private) static java.lang.String NAME_PARAMETER
          name parameter.
(package private) static java.lang.String NUMBER_OF_HARVESTS_PARAMETER
          Number of harvests parameter.
(package private) static java.lang.String TIMESPAN_PARAMETER
          Timespan parameter.
(package private) static java.lang.String UPDATE_PARAMETER
          update parameter.
 
Method Summary
static void processRequest(javax.servlet.jsp.PageContext context, I18n i18n)
          Processes the request parameters for the page Definitions-edit-schedule.jsp The parameters are first checked for validity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEGIN_AT_PARAMETER

static final java.lang.String BEGIN_AT_PARAMETER
BeginAt parameter.

See Also:
Constant Field Values

FIRST_HARVEST_TIME_PARAMETER

static final java.lang.String FIRST_HARVEST_TIME_PARAMETER
FirsrHarvestTime parameter.

See Also:
Constant Field Values

CONTINUE_PARAMETER

static final java.lang.String CONTINUE_PARAMETER
Continue parameter.

See Also:
Constant Field Values

END_HARVEST_TIME_PARAMETER

static final java.lang.String END_HARVEST_TIME_PARAMETER
EndHarvestTime parameter.

See Also:
Constant Field Values

TIMESPAN_PARAMETER

static final java.lang.String TIMESPAN_PARAMETER
Timespan parameter.

See Also:
Constant Field Values

HARVEST_TIME_PARAMETER

static final java.lang.String HARVEST_TIME_PARAMETER
HarvestTime parameter.

See Also:
Constant Field Values

FREQUENCY_MINUTES_PARAMETER

static final java.lang.String FREQUENCY_MINUTES_PARAMETER
Frequency in minutes parameter.

See Also:
Constant Field Values

FREQUENCY_HOURS_PARAMETER

static final java.lang.String FREQUENCY_HOURS_PARAMETER
Frequency in hours parameter.

See Also:
Constant Field Values

FREQUENCY_DAY_PARAMETER

static final java.lang.String FREQUENCY_DAY_PARAMETER
Frequency defined by day parameter.

See Also:
Constant Field Values

FREQUENCY_DATE_PARAMETER

static final java.lang.String FREQUENCY_DATE_PARAMETER
Frequency defined by date parameter.

See Also:
Constant Field Values

COMMENTS_PARAMETERS

static final java.lang.String COMMENTS_PARAMETERS
Comments parameter.

See Also:
Constant Field Values

EDITION_PARAMETER

static final java.lang.String EDITION_PARAMETER
Edition parameter.

See Also:
Constant Field Values

NUMBER_OF_HARVESTS_PARAMETER

static final java.lang.String NUMBER_OF_HARVESTS_PARAMETER
Number of harvests parameter.

See Also:
Constant Field Values

NAME_PARAMETER

static final java.lang.String NAME_PARAMETER
name parameter.

See Also:
Constant Field Values

UPDATE_PARAMETER

static final java.lang.String UPDATE_PARAMETER
update parameter.

See Also:
Constant Field Values

FREQUENCY_PARAMETER

static final java.lang.String FREQUENCY_PARAMETER
Frequency parameter.

See Also:
Constant Field Values
Method Detail

processRequest

public static void processRequest(javax.servlet.jsp.PageContext context,
                                  I18n i18n)
Processes the request parameters for the page Definitions-edit-schedule.jsp The parameters are first checked for validity. If they are not acceptable, an exception is thrown, otherwise the parameters are passed on to the methods editScheduleDefinition() which edits or creates the relevant schedule. update: if set, execute this method name: the name of the schedule If name is unset and update is unset, the GUI can be used to create a new schedule. It is an error condition to have name unset and update set. edition: the edition of the schedule being edited. If not specified, the name must not refer to an existing schedule. frequency: castable to an integer > 0. Actually the period between harvests in units of ... timespan: allowable values dage, timer, uger, måneder harvestTime: allowable values, whenever, aTime If whenever is set then ignore remaining values in this group frequency_hours: the hour time for harvesting, integer 0<=x<=23, must be set if aTime is set and timespan is not "hours" frequency_minutes: the minute time for harvesting, integer 0<=x<=59, must be set if aTime is set and timespan is not "hours" frequency_day: the day of the week on which the harvest is to take place. Allowable values 1-7. Must be set if timespan is set to "weeks". frequency_date: the date of the month on which harvests are to occur. Integer 1<=x<=31. Must be set if timespan is "months" beginAt: allowable values "asSoonAsPossible", "beginning". Not null firstHarvestTime: a date/time field in format DD/MM YYYY hh:mm. Must be set if beginAt="beginning" continue: allowable values "forever", "toTime", "numberOfHarvests" endHarvestTime: a date/time field in format DD/MM YYYY hh:mm. Must be set if continue="beginning" numberOfHarvests: int > 0. Must be set if continue="numberOfHarvests"

Parameters:
context - Context of web request
i18n - I18N information