public class CronEditorBean extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ADVANCED_MODE |
static String |
DAILY_SPEC_MODE |
static String |
DAYS_OF_MONTH_SPEC_MODE |
static String |
DAYS_OF_WEEK_SPEC_MODE |
static String |
DOT |
Constructor and Description |
---|
CronEditorBean() |
CronEditorBean(String paramPrefix,
Map params)
Initialises to the state defined by the given params, which are identified
by the presence of paramPrefix on the key.
|
Modifier and Type | Method and Description |
---|---|
String |
getCronString()
Returns the cron string that the object was constructed with.
|
String |
getDayInMonthOrdinal()
Returns a number that represents the first, second third etc.
|
String |
getDayOfMonth()
Gets the day of month field specified in the cron string.
|
String |
getHoursFrom()
Returns the lower bound of the hour range if this entry has a range.
|
String |
getHoursFromMeridian()
Returns the meridian indicator @{link #AM} or @{link #PM} for the lower bound of a range entry.
|
String |
getHoursRunOnce()
Returns the single hour value for this entry if it is a run once entry.
|
String |
getHoursRunOnceMeridian()
Returns the meridian indicator @{link #AM} or @{link #PM} for the entry if it is a run once entry.
|
String |
getHoursTo()
Returns the upper bound of the hour range if this entry has a range.
|
String |
getHoursToMeridian()
Returns the meridian indicator @{link #AM} or @{link #PM} for the upper bound of a range entry.
|
String |
getIncrementInMinutes()
Used to determine the total increment in minutes derived by the hour and minutes fields' increment parts.
|
String |
getMinutes()
Gets the minutes specified.
|
String |
getSeconds() |
String |
getSpecifiedDaysPerWeek()
Returns all the days that have been specified in a comma separated list.
|
boolean |
is24HourRange()
Indicates that the range of time specified spans across the full 24 hours in a day (which is indicated by the
computed hoursFrom in 24 hour time being equal to the computed hoursTo in 24 hour time).
|
boolean |
isAdvancedMode()
Will return true if the passed in cron string is not valid for the editor.
|
boolean |
isDailyMode()
Will return true if the editors daily mode can handle the provided cron string.
|
boolean |
isDayOfWeekOfMonth()
Returns true if
isDaysPerMonthMode() is true and the sub-mode of day of week per month has been
selected. |
boolean |
isDayPerWeekMode()
Will return true if the editors day per week mode can handle the provided cron string.
|
boolean |
isDaySpecified(String dayStr)
Returns true if the passed in day has been specified, false otherwise.
|
boolean |
isDaysPerMonthMode()
Will return true if the editors days per month mode can handle the provided cron string.
|
boolean |
isRange()
Indicates that a range of time is being specified.
|
boolean |
isRangeHoursValid()
Used to validate the hours to see that the from hour is before the to hour, if specified.
|
void |
setCronString(String cronString)
The full cron string that may have been specified.
|
void |
setDayInMonthOrdinal(String dayInMonthOrdinal) |
void |
setDayOfMonth(String dayOfMonth) |
void |
setDayOfWeekOfMonth(boolean dayOfWeekOfMonth) |
void |
setHoursFrom(String hoursFrom) |
void |
setHoursFromMeridian(String hoursFromMeridian) |
void |
setHoursRunOnce(String hoursRunOnce) |
void |
setHoursRunOnceMeridian(String hoursRunOnceMeridian) |
void |
setHoursTo(String hoursTo) |
void |
setHoursToMeridian(String hoursToMeridian) |
void |
setIncrementInMinutes(String incrementInMinutes)
Set the interval of repetition.
|
void |
setMinutes(String minutes) |
void |
setMode(String mode) |
void |
setSeconds(String seconds) |
void |
setSpecifiedDaysOfWeek(String specifiedDaysOfWeek) |
public static final String DAILY_SPEC_MODE
public static final String DAYS_OF_WEEK_SPEC_MODE
public static final String DAYS_OF_MONTH_SPEC_MODE
public static final String ADVANCED_MODE
public static final String DOT
public boolean isRangeHoursValid()
public boolean isRange()
public boolean is24HourRange()
public String getCronString()
public boolean isAdvancedMode()
public boolean isDailyMode()
public boolean isDayPerWeekMode()
mode
is equal to DAYS_OF_WEEK_SPEC_MODE
, false otherwisepublic boolean isDaysPerMonthMode()
mode
is equal to DAYS_OF_MONTH_SPEC_MODE
, false otherwisepublic boolean isDayOfWeekOfMonth()
isDaysPerMonthMode()
is true and the sub-mode of day of week per month has been
selected.public String getDayOfMonth()
public String getMinutes()
public String getHoursFrom()
This end of the range is inclusive - e.g. if HoursFrom is 3PM and HoursTo is 5PM, the duration of the range is 2 hours.
public String getHoursTo()
This end of the range is exclusive - e.g. if HoursFrom is 3PM and HoursTo is 5PM, the duration of the range is 2 hours.
public String getHoursFromMeridian()
public String getHoursToMeridian()
public String getHoursRunOnce()
public String getHoursRunOnceMeridian()
public boolean isDaySpecified(String dayStr)
dayStr
- a string representing a day (e.g. 1-7).public String getDayInMonthOrdinal()
public String getSpecifiedDaysPerWeek()
public String getIncrementInMinutes()
public void setCronString(String cronString)
cronString
- a valid cron string.public void setMode(String mode)
public void setDayOfWeekOfMonth(boolean dayOfWeekOfMonth)
public void setDayOfMonth(String dayOfMonth)
public void setMinutes(String minutes)
public void setHoursFrom(String hoursFrom)
public void setHoursTo(String hoursTo)
public void setHoursFromMeridian(String hoursFromMeridian)
public void setHoursToMeridian(String hoursToMeridian)
public void setHoursRunOnce(String hoursRunOnce)
public void setHoursRunOnceMeridian(String hoursRunOnceMeridian)
public void setSpecifiedDaysOfWeek(String specifiedDaysOfWeek)
public void setDayInMonthOrdinal(String dayInMonthOrdinal)
public void setIncrementInMinutes(String incrementInMinutes)
incrementInMinutes
- the interval or "0"public void setSeconds(String seconds)
public String getSeconds()
Copyright © 2002-2019 Atlassian. All Rights Reserved.