dk.netarkivet.harvester.webinterface
Class ScheduleDefinition

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

public 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
          Parameters for the Definitions-edit-schedule.jsp page.
(package private) static java.lang.String COMMENTS_PARAMETERS
           
(package private) static java.lang.String CONTINUE_PARAMETER
           
(package private) static java.lang.String EDITION_PARAMETER
           
(package private) static java.lang.String END_HARVEST_TIME_PARAMETER
           
(package private) static java.lang.String FIRST_HARVEST_TIME_PARAMETER
           
(package private) static java.lang.String FREQUENCY_DATE_PARAMETER
           
(package private) static java.lang.String FREQUENCY_DAY_PARAMETER
           
(package private) static java.lang.String FREQUENCY_HOURS_PARAMETER
           
(package private) static java.lang.String FREQUENCY_MINUTES_PARAMETER
           
(package private) static java.lang.String FREQUENCY_PARAMETER
           
(package private) static java.lang.String HARVEST_TIME_PARAMETER
           
(package private) static java.lang.String NAME_PARAMETER
           
(package private) static java.lang.String NUMBER_OF_HARVESTS_PARAMETER
           
(package private) static java.lang.String TIMESPAN_PARAMETER
           
(package private) static java.lang.String 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
Parameters for the Definitions-edit-schedule.jsp page. They should be self explanatory.

See Also:
Constant Field Values

FIRST_HARVEST_TIME_PARAMETER

static final java.lang.String FIRST_HARVEST_TIME_PARAMETER
See Also:
Constant Field Values

CONTINUE_PARAMETER

static final java.lang.String CONTINUE_PARAMETER
See Also:
Constant Field Values

END_HARVEST_TIME_PARAMETER

static final java.lang.String END_HARVEST_TIME_PARAMETER
See Also:
Constant Field Values

TIMESPAN_PARAMETER

static final java.lang.String TIMESPAN_PARAMETER
See Also:
Constant Field Values

HARVEST_TIME_PARAMETER

static final java.lang.String HARVEST_TIME_PARAMETER
See Also:
Constant Field Values

FREQUENCY_MINUTES_PARAMETER

static final java.lang.String FREQUENCY_MINUTES_PARAMETER
See Also:
Constant Field Values

FREQUENCY_HOURS_PARAMETER

static final java.lang.String FREQUENCY_HOURS_PARAMETER
See Also:
Constant Field Values

FREQUENCY_DAY_PARAMETER

static final java.lang.String FREQUENCY_DAY_PARAMETER
See Also:
Constant Field Values

FREQUENCY_DATE_PARAMETER

static final java.lang.String FREQUENCY_DATE_PARAMETER
See Also:
Constant Field Values

COMMENTS_PARAMETERS

static final java.lang.String COMMENTS_PARAMETERS
See Also:
Constant Field Values

EDITION_PARAMETER

static final java.lang.String EDITION_PARAMETER
See Also:
Constant Field Values

NUMBER_OF_HARVESTS_PARAMETER

static final java.lang.String NUMBER_OF_HARVESTS_PARAMETER
See Also:
Constant Field Values

NAME_PARAMETER

static final java.lang.String NAME_PARAMETER
See Also:
Constant Field Values

UPDATE_PARAMETER

static final java.lang.String UPDATE_PARAMETER
See Also:
Constant Field Values

FREQUENCY_PARAMETER

static final java.lang.String 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