BEAST
eu.baltrad.beast.scheduler.CronEntryUtilities Class Reference

Utilities when working with cron entry expressions. More...

Public Member Functions

 CronEntryUtilities ()
 Constructor.
 
String createBasePattern (List< String > values)
 Creates a base expression from a list of values or intervals.
 
List< String > parseBasePattern (String value)
 Parses a base pattern into it's separate parts, i.e.
 
String createSecondPattern (List< String > values)
 Creates a second pattern.
 
List< String > parseSecondPattern (String value)
 Parses a second pattern.
 
String createMinutePattern (List< String > values)
 Creates a minute pattern.
 
List< String > parseMinutePattern (String value)
 Parses a minute pattern.
 
String createHourPattern (List< String > values)
 Creates a hour pattern.
 
List< String > parseHourPattern (String value)
 Parses a hour pattern.
 
String createDayOfMonthPattern (List< String > values)
 Creates a day of month pattern.
 
List< String > parseDayOfMonthPattern (String value)
 Parses a day of month pattern.
 
String createMonthPattern (List< String > values)
 Creates a month pattern.
 
List< String > parseMonthPattern (String value)
 Parses a month pattern.
 
String createDayOfWeekPattern (List< String > values)
 Creates a day of week pattern.
 
List< String > parseDayOfWeekPattern (String value)
 Parses a day of week pattern.
 
String createYearPattern (List< String > values)
 Creates a year pattern.
 
List< String > parseYearPattern (String value)
 Parses a year pattern.
 
List< String >[] parseAllInExpression (String expression)
 Extracts all individual entries for all fields in a cron expression.
 
String createExpression (List< String > seconds, List< String > minutes, List< String > hours, List< String > daysOfMonth, List< String > months, List< String > daysOfWeek)
 Creates a cron expression from provided entries.
 

Static Public Member Functions

static void validateExpression (String expression)
 Validates that an expression is valid.
 

Static Public Attributes

static final int SECONDS_INDEX = 0
 Index of seconds.
 
static final int MINUTES_INDEX = 1
 Index of minutes.
 
static final int HOURS_INDEX = 2
 Index of hours.
 
static final int DAYSOFMONTH_INDEX = 3
 Index of days of month.
 
static final int MONTHS_INDEX = 4
 Index of months.
 
static final int DAYSOFWEEK_INDEX = 5
 Index of days of week.
 
static final int YEARS_INDEX = 6
 Index of years.
 

Detailed Description

Utilities when working with cron entry expressions.

Author
Anders Henja

Constructor & Destructor Documentation

◆ CronEntryUtilities()

eu.baltrad.beast.scheduler.CronEntryUtilities.CronEntryUtilities ( )
inline

Constructor.

Member Function Documentation

◆ createBasePattern()

String eu.baltrad.beast.scheduler.CronEntryUtilities.createBasePattern ( List< String > values)
inline

Creates a base expression from a list of values or intervals.

I.e. it is allowed to specify a sequence like 3,5,&#42;/2 which would mean every second value and also value 3 and 5. Only allowed characters are 0-9 - * and /. I.e. separator character , is not allowed since it will be used to concatenate the strings.

Parameters
valuesa list of values
Returns
the string pattern

◆ createDayOfMonthPattern()

String eu.baltrad.beast.scheduler.CronEntryUtilities.createDayOfMonthPattern ( List< String > values)
inline

Creates a day of month pattern.

Parameters
valuesthe day of month patterns
Returns
the day of month pattern

◆ createDayOfWeekPattern()

String eu.baltrad.beast.scheduler.CronEntryUtilities.createDayOfWeekPattern ( List< String > values)
inline

Creates a day of week pattern.

Parameters
valuesthe day of week patterns
Returns
the day of week pattern

◆ createExpression()

String eu.baltrad.beast.scheduler.CronEntryUtilities.createExpression ( List< String > seconds,
List< String > minutes,
List< String > hours,
List< String > daysOfMonth,
List< String > months,
List< String > daysOfWeek )
inline

Creates a cron expression from provided entries.

Parameters
secondsthe second patterns
minutesthe minute patterns
hoursthe hour patterns
daysOfMonththe day of month patterns
monthsthe month patterns
daysOfWeekthe day of week patterns
Returns
a cron expression

◆ createHourPattern()

String eu.baltrad.beast.scheduler.CronEntryUtilities.createHourPattern ( List< String > values)
inline

Creates a hour pattern.

Parameters
valuesthe hour values
Returns
the hour pattern

◆ createMinutePattern()

String eu.baltrad.beast.scheduler.CronEntryUtilities.createMinutePattern ( List< String > values)
inline

Creates a minute pattern.

Parameters
valuesthe minute values
Returns
the minute pattern

◆ createMonthPattern()

String eu.baltrad.beast.scheduler.CronEntryUtilities.createMonthPattern ( List< String > values)
inline

Creates a month pattern.

Parameters
valuesthe month values
Returns
the month pattern

◆ createSecondPattern()

String eu.baltrad.beast.scheduler.CronEntryUtilities.createSecondPattern ( List< String > values)
inline

Creates a second pattern.

Parameters
valuesthe second values
Returns
the second pattern

◆ createYearPattern()

String eu.baltrad.beast.scheduler.CronEntryUtilities.createYearPattern ( List< String > values)
inline

Creates a year pattern.

Parameters
valuesthe year values
Returns
the year pattern

◆ parseAllInExpression()

List< String >[] eu.baltrad.beast.scheduler.CronEntryUtilities.parseAllInExpression ( String expression)
inline

Extracts all individual entries for all fields in a cron expression.

Parameters
expressionthe cron expression
Returns
an array of entries

◆ parseBasePattern()

List< String > eu.baltrad.beast.scheduler.CronEntryUtilities.parseBasePattern ( String value)
inline

Parses a base pattern into it's separate parts, i.e.

splits by comma.

Parameters
valuethe pattern
Returns
an array of individual values

◆ parseDayOfMonthPattern()

List< String > eu.baltrad.beast.scheduler.CronEntryUtilities.parseDayOfMonthPattern ( String value)
inline

Parses a day of month pattern.

Parameters
valuethe day of month pattern
Returns
an array of individual day of month patterns

◆ parseDayOfWeekPattern()

List< String > eu.baltrad.beast.scheduler.CronEntryUtilities.parseDayOfWeekPattern ( String value)
inline

Parses a day of week pattern.

Parameters
valuethe day of week pattern
Returns
an array of individual day of week patterns

◆ parseHourPattern()

List< String > eu.baltrad.beast.scheduler.CronEntryUtilities.parseHourPattern ( String value)
inline

Parses a hour pattern.

Parameters
valuethe hour pattern
Returns
an array of individual hour patterns

◆ parseMinutePattern()

List< String > eu.baltrad.beast.scheduler.CronEntryUtilities.parseMinutePattern ( String value)
inline

Parses a minute pattern.

Parameters
valuethe minute pattern
Returns
an array of individual minute patterns

◆ parseMonthPattern()

List< String > eu.baltrad.beast.scheduler.CronEntryUtilities.parseMonthPattern ( String value)
inline

Parses a month pattern.

Parameters
valuethe month pattern
Returns
an array of individual month patterns

◆ parseSecondPattern()

List< String > eu.baltrad.beast.scheduler.CronEntryUtilities.parseSecondPattern ( String value)
inline

Parses a second pattern.

Parameters
valuethe second pattern
Returns
an array of individual second patterns

◆ parseYearPattern()

List< String > eu.baltrad.beast.scheduler.CronEntryUtilities.parseYearPattern ( String value)
inline

Parses a year pattern.

Parameters
valuethe year pattern
Returns
an array of individual year patterns

◆ validateExpression()

static void eu.baltrad.beast.scheduler.CronEntryUtilities.validateExpression ( String expression)
inlinestatic

Validates that an expression is valid.

Parameters
expressionthe expression to validate
Exceptions
SchedulerExceptionif the expression isn't valid

Member Data Documentation

◆ DAYSOFMONTH_INDEX

final int eu.baltrad.beast.scheduler.CronEntryUtilities.DAYSOFMONTH_INDEX = 3
static

Index of days of month.

◆ DAYSOFWEEK_INDEX

final int eu.baltrad.beast.scheduler.CronEntryUtilities.DAYSOFWEEK_INDEX = 5
static

Index of days of week.

◆ HOURS_INDEX

final int eu.baltrad.beast.scheduler.CronEntryUtilities.HOURS_INDEX = 2
static

Index of hours.

◆ MINUTES_INDEX

final int eu.baltrad.beast.scheduler.CronEntryUtilities.MINUTES_INDEX = 1
static

Index of minutes.

◆ MONTHS_INDEX

final int eu.baltrad.beast.scheduler.CronEntryUtilities.MONTHS_INDEX = 4
static

Index of months.

◆ SECONDS_INDEX

final int eu.baltrad.beast.scheduler.CronEntryUtilities.SECONDS_INDEX = 0
static

Index of seconds.

◆ YEARS_INDEX

final int eu.baltrad.beast.scheduler.CronEntryUtilities.YEARS_INDEX = 6
static

Index of years.


The documentation for this class was generated from the following file: