com.atlassian.scheduler.cron
Interface CronExpressionValidator


@PublicApi
public interface CronExpressionValidator

Since:
v1.4

Method Summary
 boolean isValid(String cronExpression)
          Returns true if the cron expression can be parsed successfully.
 void validate(String cronExpression)
          Validates that a cron expression can be successfully parsed.
 

Method Detail

isValid

boolean isValid(String cronExpression)
Returns true if the cron expression can be parsed successfully.

This is equivalent to calling validate(String) except that it returns a boolean value as opposed to throwing an exception when the expression is not valid.

Parameters:
cronExpression - the cron expression to be considered
Returns:
true if the cron expression can be parsed successfully; false otherwise.

validate

void validate(String cronExpression)
              throws CronSyntaxException
Validates that a cron expression can be successfully parsed.

Parameters:
cronExpression - the cron expression to be considered
Throws:
CronSyntaxException - if the cron expression contains invalid syntax


Copyright © 2015 Atlassian. All rights reserved.