Skip to content

Commit

Permalink
Merge pull request #1220 from bcode2/branch-2.5-refactor-CronTriggerImpl
Browse files Browse the repository at this point in the history
Branch 2.5 refactor CronTriggerImpl
  • Loading branch information
jhouserizer authored Oct 23, 2024
2 parents c147179 + a09c7d5 commit d85adad
Showing 1 changed file with 0 additions and 221 deletions.
221 changes: 0 additions & 221 deletions quartz/src/main/java/org/quartz/impl/triggers/CronTriggerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,227 +109,6 @@ public CronTriggerImpl() {
setTimeZone(TimeZone.getDefault());
}

/**
* <p>
* Create a <code>CronTrigger</code> with the given name and default group.
* </p>
*
* <p>
* The start-time will also be set to the current time, and the time zone
* will be set the system's default time zone.
* </p>
*
* @deprecated use a TriggerBuilder instead
*/
@Deprecated
public CronTriggerImpl(String name) {
this(name, null);
}

/**
* <p>
* Create a <code>CronTrigger</code> with the given name and group.
* </p>
*
* <p>
* The start-time will also be set to the current time, and the time zone
* will be set the system's default time zone.
* </p>
*
* @deprecated use a TriggerBuilder instead
*/
@Deprecated
public CronTriggerImpl(String name, String group) {
super(name, group);
setStartTime(new Date());
setTimeZone(TimeZone.getDefault());
}

/**
* <p>
* Create a <code>CronTrigger</code> with the given name, group and
* expression.
* </p>
*
* <p>
* The start-time will also be set to the current time, and the time zone
* will be set the system's default time zone.
* </p>
*
* @deprecated use a TriggerBuilder instead
*/
@Deprecated
public CronTriggerImpl(String name, String group, String cronExpression)
throws ParseException {

super(name, group);

setCronExpression(cronExpression);

setStartTime(new Date());
setTimeZone(TimeZone.getDefault());
}

/**
* <p>
* Create a <code>CronTrigger</code> with the given name and group, and
* associated with the identified <code>{@link org.quartz.JobDetail}</code>.
* </p>
*
* <p>
* The start-time will also be set to the current time, and the time zone
* will be set the system's default time zone.
* </p>
*
* @deprecated use a TriggerBuilder instead
*/
@Deprecated
public CronTriggerImpl(String name, String group, String jobName,
String jobGroup) {
super(name, group, jobName, jobGroup);
setStartTime(new Date());
setTimeZone(TimeZone.getDefault());
}

/**
* <p>
* Create a <code>CronTrigger</code> with the given name and group,
* associated with the identified <code>{@link org.quartz.JobDetail}</code>,
* and with the given "cron" expression.
* </p>
*
* <p>
* The start-time will also be set to the current time, and the time zone
* will be set the system's default time zone.
* </p>
*
* @deprecated use a TriggerBuilder instead
*/
@Deprecated
public CronTriggerImpl(String name, String group, String jobName,
String jobGroup, String cronExpression) throws ParseException {
this(name, group, jobName, jobGroup, null, null, cronExpression,
TimeZone.getDefault());
}

/**
* <p>
* Create a <code>CronTrigger</code> with the given name and group,
* associated with the identified <code>{@link org.quartz.JobDetail}</code>,
* and with the given "cron" expression resolved with respect to the <code>TimeZone</code>.
* </p>
*
* @deprecated use a TriggerBuilder instead
*/
@Deprecated
public CronTriggerImpl(String name, String group, String jobName,
String jobGroup, String cronExpression, TimeZone timeZone)
throws ParseException {
this(name, group, jobName, jobGroup, null, null, cronExpression,
timeZone);
}

/**
* <p>
* Create a <code>CronTrigger</code> that will occur at the given time,
* until the given end time.
* </p>
*
* <p>
* If null, the start-time will also be set to the current time, the time
* zone will be set the system's default.
* </p>
*
* @param startTime
* A <code>Date</code> set to the time for the <code>Trigger</code>
* to fire.
* @param endTime
* A <code>Date</code> set to the time for the <code>Trigger</code>
* to quit repeat firing.
*
* @deprecated use a TriggerBuilder instead
*/
@Deprecated
public CronTriggerImpl(String name, String group, String jobName,
String jobGroup, Date startTime, Date endTime, String cronExpression)
throws ParseException {
super(name, group, jobName, jobGroup);

setCronExpression(cronExpression);

if (startTime == null) {
startTime = new Date();
}
setStartTime(startTime);
if (endTime != null) {
setEndTime(endTime);
}
setTimeZone(TimeZone.getDefault());

}

/**
* <p>
* Create a <code>CronTrigger</code> with fire time dictated by the
* <code>cronExpression</code> resolved with respect to the specified
* <code>timeZone</code> occurring from the <code>startTime</code> until
* the given <code>endTime</code>.
* </p>
*
* <p>
* If null, the start-time will also be set to the current time. If null,
* the time zone will be set to the system's default.
* </p>
*
* @param name
* of the <code>Trigger</code>
* @param group
* of the <code>Trigger</code>
* @param jobName
* name of the <code>{@link org.quartz.JobDetail}</code>
* executed on firetime
* @param jobGroup
* group of the <code>{@link org.quartz.JobDetail}</code>
* executed on firetime
* @param startTime
* A <code>Date</code> set to the earliest time for the <code>Trigger</code>
* to start firing.
* @param endTime
* A <code>Date</code> set to the time for the <code>Trigger</code>
* to quit repeat firing.
* @param cronExpression
* A cron expression dictating the firing sequence of the <code>Trigger</code>
* @param timeZone
* Specifies for which time zone the <code>cronExpression</code>
* should be interpreted, i.e. the expression 0 0 10 * * ?, is
* resolved to 10:00 am in this time zone.
* @throws ParseException
* if the <code>cronExpression</code> is invalid.
*
* @deprecated use a TriggerBuilder instead
*/
@Deprecated
public CronTriggerImpl(String name, String group, String jobName,
String jobGroup, Date startTime, Date endTime,
String cronExpression, TimeZone timeZone) throws ParseException {
super(name, group, jobName, jobGroup);

setCronExpression(cronExpression);

if (startTime == null) {
startTime = new Date();
}
setStartTime(startTime);
if (endTime != null) {
setEndTime(endTime);
}
if (timeZone == null) {
setTimeZone(TimeZone.getDefault());
} else {
setTimeZone(timeZone);
}
}

/*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
Expand Down

0 comments on commit d85adad

Please sign in to comment.