i-net Clear Reports

com.inet.report.schedule
Class ScheduleExecutionFactory

java.lang.Object
  extended by com.inet.report.schedule.ScheduleExecutionFactory

public final class ScheduleExecutionFactory
extends java.lang.Object

A factory class to create ExecutionTimeProvider objects of the type ScheduleExecution. Use this class to create such objects.

Since:
6.0
See Also:
OneDayExecution, DailyExecution, WeeklyExecution, MonthlyExecution, ScheduleExecution, ExecutionTimeProvider

Method Summary
static DailyExecution createDailyExecution(java.util.Date date, int dayStepSize, int hour, int minute)
          Creates a ScheduleExecution object of the type DailyExecution with a specified start date, day step size, and start time.
static DailyExecution createDailyExecution(java.util.Date date, int dayStepSize, int startHour, int endHour, int stepSize, int minute)
          Creates a ScheduleExecution object of the type DailyExecution with a specified start date, day step size, and hour range.
static MonthlyExecution createMonthlyExecution(java.util.Date date, int[] specificMonths, int[] specificDays, int hour, int minute)
          Creates a ScheduleExecution object of the type MonthlyExecution with a specified start date, months of the year, days of the month, and start time.
static MonthlyExecution createMonthlyExecution(java.util.Date date, int[] specificMonths, int[] specificDays, int startHour, int endHour, int stepSize, int minute)
          Creates a ScheduleExecution object of the type MonthlyExecution with a specified start date, months of the year, days of the month, and hour range.
static OneDayExecution createOneDayExecution(java.util.Date date, int hour, int minute)
          Creates a ScheduleExecution object of the type OneDayExecution with a specified start date and start time.
static OneDayExecution createOneDayExecution(java.util.Date date, int startHour, int endHour, int stepSize, int minute)
          Creates a ScheduleExecution object of the type OneDayExecution with a specified start date and hour range.
static ScheduleExecution createScheduleExecution(int intervalType)
          Creates an empty ScheduleExecution object of type intervalType - defined by constants in the class ScheduleExecution.
static WeeklyExecution createWeeklyExecution(java.util.Date date, int weekStepSize, int[] specificDays, int hour, int minute)
          Creates a ScheduleExecution object of the type WeeklyExecution with a specified start date, week step size, days of the week, and start time.
static WeeklyExecution createWeeklyExecution(java.util.Date date, int weekStepSize, int[] specificDays, int startHour, int endHour, int stepSize, int minute)
          Creates a ScheduleExecution object of the type WeeklyExecution with a specified start date, week step size, days of the week, and hour range.
 

Method Detail

createScheduleExecution

public static ScheduleExecution createScheduleExecution(int intervalType)
Creates an empty ScheduleExecution object of type intervalType - defined by constants in the class ScheduleExecution. The constants are ONLY_ONCE, DAILY_INTERVAL, WEEKLY_INTERVAL, MONTHLY_INTERVAL

Parameters:
intervalType - Defines the interval type of the schedule execution
Returns:
The created empty ScheduleExecution object

createOneDayExecution

public static OneDayExecution createOneDayExecution(java.util.Date date,
                                                    int hour,
                                                    int minute)
                                             throws ScheduleException
Creates a ScheduleExecution object of the type OneDayExecution with a specified start date and start time.

Example: "On April 25th, 2005 at 10:13 a.m."
createOneDayExecution(new Date(105,3,25),10,13);

Parameters:
date - The date (NOT to be mistaken for the point in time - the only thing that counts in the date object is the actual day - setting a Date object with time information will cause the time information to be ignored.) the task is to be run on - must not be null
hour - The hour of day the task is to be run on - must be between 0 and 23
minute - The minute of the hour the task is to be run on - must be between 0 and 59
Returns:
The created ScheduleExecution object
Throws:
ScheduleException - If a parameter was invalid or illegal

createOneDayExecution

public static OneDayExecution createOneDayExecution(java.util.Date date,
                                                    int startHour,
                                                    int endHour,
                                                    int stepSize,
                                                    int minute)
                                             throws ScheduleException
Creates a ScheduleExecution object of the type OneDayExecution with a specified start date and hour range.

Example: "On April 25th, 2005 at 10:13 and 11:13 a.m."
createOneDayExecution(new Date(105,3,25),10,11,1,13);

Parameters:
date - The date (NOT to be mistaken for the point in time - the only thing that counts in the date object is the actual day - setting a Date object with time information will cause the time information to be ignored.) the task is to be run on - must not be null
startHour - The start hour of the hour range - must be between 0 and 23
endHour - The end hour of the hour range - must be between 0 and 23
stepSize - The step size of the hour range - must be at least 1
minute - The minute of the hour the task is to be run on - must be between 0 and 59
Returns:
The created ScheduleExecution object
Throws:
ScheduleException - If a parameter was invalid or illegal

createDailyExecution

public static DailyExecution createDailyExecution(java.util.Date date,
                                                  int dayStepSize,
                                                  int hour,
                                                  int minute)
                                           throws ScheduleException
Creates a ScheduleExecution object of the type DailyExecution with a specified start date, day step size, and start time.

Example: "Every 3 days, starting on April 25th, 2005 at 10:13 a.m."
createDailyExecution(new Date(105,3,25),3,10,13);

Parameters:
date - The date (NOT to be mistaken for the point in time - the only thing that counts in the date object is the actual day - setting a Date object with time information will cause the time information to be ignored.) the task is to be run on - must not be null
dayStepSize - The day step size - must be at least 1
hour - The hour of day the task is to be run on - must be between 0 and 23
minute - The minute of the hour the task is to be run on - must be between 0 and 59
Returns:
The created ScheduleExecution object
Throws:
ScheduleException - If a parameter was invalid or illegal

createDailyExecution

public static DailyExecution createDailyExecution(java.util.Date date,
                                                  int dayStepSize,
                                                  int startHour,
                                                  int endHour,
                                                  int stepSize,
                                                  int minute)
                                           throws ScheduleException
Creates a ScheduleExecution object of the type DailyExecution with a specified start date, day step size, and hour range.

Example: "Every 3 days, starting on April 25th, 2005, at 10:13 and 11:13 a.m."
createDailyExecution(new Date(105,3,25),3,10,11,1,13);

Parameters:
date - The date (NOT to be mistaken for the point in time - the only thing that counts in the date object is the actual day - setting a Date object with time information will cause the time information to be ignored.) the task is to be run on - must not be null
dayStepSize - The day step size - must be at least 1
startHour - The start hour of the hour range - must be between 0 and 23
endHour - The end hour of the hour range - must be between 0 and 23
stepSize - The step size of the hour range - must be at least 1
minute - The minute of the hour the task is to be run on - must be between 0 and 59
Returns:
The created ScheduleExecution object
Throws:
ScheduleException - If a parameter was invalid or illegal

createWeeklyExecution

public static WeeklyExecution createWeeklyExecution(java.util.Date date,
                                                    int weekStepSize,
                                                    int[] specificDays,
                                                    int hour,
                                                    int minute)
                                             throws ScheduleException
Creates a ScheduleExecution object of the type WeeklyExecution with a specified start date, week step size, days of the week, and start time.

Example: "Every 3 weeks on Monday, Friday, and Sunday, starting on April 25th, 2005 at 10:13 a.m."
createWeeklyExecution(new Date(105,3,25),3,new int[]{1,5,7},10,13);

Parameters:
date - The date (NOT to be mistaken for the point in time - the only thing that counts in the date object is the actual day - setting a Date object with time information will cause the time information to be ignored.) the task is to be run on - must not be null
weekStepSize - The week step size - must be at least 1
specificDays - The specific days of the week as an int array. The array must not be null or empty, the days are 1-based starting on Monday.
hour - The hour of day the task is to be run on - must be between 0 and 23
minute - The minute of the hour the task is to be run on - must be between 0 and 59
Returns:
The created ScheduleExecution object
Throws:
ScheduleException - If a parameter was invalid or illegal

createWeeklyExecution

public static WeeklyExecution createWeeklyExecution(java.util.Date date,
                                                    int weekStepSize,
                                                    int[] specificDays,
                                                    int startHour,
                                                    int endHour,
                                                    int stepSize,
                                                    int minute)
                                             throws ScheduleException
Creates a ScheduleExecution object of the type WeeklyExecution with a specified start date, week step size, days of the week, and hour range.

Example: "Every 3 weeks on Monday, Friday, and Sunday, starting on April 25th, 2005 at 10:13 and 11:13 a.m."
createWeeklyExecution(new Date(105,3,25),3,new int[]{1,5,7},10,11,1,13);

Parameters:
date - The date (NOT to be mistaken for the point in time - the only thing that counts in the date object is the actual day - setting a Date object with time information will cause the time information to be ignored.) the task is to be run on - must not be null
weekStepSize - The week step size - must be at least 1
specificDays - The specific days of the week as an int array. The array must not be null or empty, the days are 1-based starting on Monday.
startHour - The start hour of the hour range - must be between 0 and 23
endHour - The end hour of the hour range - must be between 0 and 23
stepSize - The step size of the hour range - must be at least 1
minute - The minute of the hour the task is to be run on - must be between 0 and 59
Returns:
The created ScheduleExecution object
Throws:
ScheduleException - If a parameter was invalid or illegal

createMonthlyExecution

public static MonthlyExecution createMonthlyExecution(java.util.Date date,
                                                      int[] specificMonths,
                                                      int[] specificDays,
                                                      int hour,
                                                      int minute)
                                               throws ScheduleException
Creates a ScheduleExecution object of the type MonthlyExecution with a specified start date, months of the year, days of the month, and start time.

Example: "Every January, April, and December, on the 2nd and 5th of the month, starting on April 25th, 2005, at 10:13 a.m."
createMonthlyExecution(new Date(105,3,25),new int[]{1,4,12},new int[]{2,5},10,13);

Parameters:
date - The date (NOT to be mistaken for the point in time - the only thing that counts in the date object is the actual day - setting a Date object with time information will cause the time information to be ignored.) the task is to be run on - must not be null
specificMonths - The specific months of the year as an int array. The array must not be null or empty, the days are 1-based starting in January, and must not be greater than 12 (December).
specificDays - The specific days of the month as an int array. The array must not be null or empty, the days are 1-based and must not be greater than 31. Days invalid for chosen months are ignored for that month.
hour - The hour of day the task is to be run on - must be between 0 and 23
minute - The minute of the hour the task is to be run on - must be between 0 and 59
Returns:
The created ScheduleExecution object
Throws:
ScheduleException - If a parameter was invalid or illegal

createMonthlyExecution

public static MonthlyExecution createMonthlyExecution(java.util.Date date,
                                                      int[] specificMonths,
                                                      int[] specificDays,
                                                      int startHour,
                                                      int endHour,
                                                      int stepSize,
                                                      int minute)
                                               throws ScheduleException
Creates a ScheduleExecution object of the type MonthlyExecution with a specified start date, months of the year, days of the month, and hour range.

Example: "Every January, April, and December, on the 2nd and 5th of the month, starting on April 25th, 2005, at 10:13 and 11:13 a.m."
createMonthlyExecution(new Date(105,3,25),new int[]{1,4,12},new int[]{2,5},10,11,1,13);

Parameters:
date - The date (NOT to be mistaken for the point in time - the only thing that counts in the date object is the actual day - setting a Date object with time information will cause the time information to be ignored.) the task is to be run on - must not be null
specificMonths - The specific months of the year as an int array. The array must not be null or empty, the days are 1-based starting in January, and must not be greater than 12 (December).
specificDays - The specific days of the month as an int array. The array must not be null or empty, the days are 1-based and must not be greater than 31. Days invalid for chosen months are ignored for that month.
startHour - The start hour of the hour range - must be between 0 and 23
endHour - The end hour of the hour range - must be between 0 and 23
stepSize - The step size of the hour range - must be at least 1
minute - The minute of the hour the task is to be run on - must be between 0 and 59
Returns:
The created ScheduleExecution object
Throws:
ScheduleException - If a parameter was invalid or illegal

i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH