1 package com.atlassian.scheduler.core.spi;
2
3 import com.atlassian.scheduler.config.Schedule;
4
5 import javax.annotation.Nullable;
6 import java.util.TimeZone;
7
8 /**
9 * Allows the host application to supply configuration parameters to the scheduler services.
10 *
11 * @since v1.0
12 */
13 public interface SchedulerServiceConfiguration {
14 /**
15 * Returns the default {@code TimeZone} to use when scheduling a job to run according to a
16 * {@link Schedule#forCronExpression(String) cron expression} when no specific time zone is
17 * provided.
18 * <p>
19 * The value is checked when the job is scheduled and treated as if it were given explicitly.
20 * As a result, if the host application is configured to use a new default time zone, then this
21 * will be used for jobs that are scheduled after the change, but existing jobs will continue
22 * to use the original setting.
23 * </p>
24 *
25 * @return the default time zone to use for cron expression schedules; if the configuration
26 * object returns {@code null}, then {@link TimeZone#getDefault()} is assumed
27 */
28 @Nullable
29 TimeZone getDefaultTimeZone();
30 }