|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.plugins.schedule.admin.support.CronExpressionValidator
public class CronExpressionValidator
Validates a cron expression, and returns the future executions.
Method Summary | |
---|---|
static java.util.List<java.util.Date> |
getFutureSchedules(java.lang.String cronExpressionValue,
int limit)
Finds the next execution occurences of a cron expression from now. |
static java.util.List<java.util.Date> |
getFutureSchedules(java.lang.String cronExpressionValue,
int limit,
java.util.Date fromDate)
Finds the next execution occurences of a cron expression from now. |
static boolean |
isValid(java.lang.String cronExpressionValue)
Determines if the cron expression is valid according to Quartz. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.util.List<java.util.Date> getFutureSchedules(java.lang.String cronExpressionValue, int limit) throws java.text.ParseException
cronExpressionValue
- the expression to evaluationlimit
- the maximum number of dates to return
java.text.ParseException
- if the cron expression is invalidpublic static java.util.List<java.util.Date> getFutureSchedules(java.lang.String cronExpressionValue, int limit, java.util.Date fromDate) throws java.text.ParseException
cronExpressionValue
- the expression to evaluationlimit
- the maximum number of dates to returnfromDate
- the date to start from, or now if null
java.text.ParseException
- if the cron expression is invalidpublic static boolean isValid(java.lang.String cronExpressionValue)
The Quartz CronExpression seems a bit buggy - it seems to ignore last character in string when validating.
However, since ultimate the expression is consumed by Quartz, it will accept it anyway.
cronExpressionValue
- the expression to validate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |