|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.crowd.manager.backup.QuartzBackupScheduler
public class QuartzBackupScheduler
Quartz-specific implementation of BackupScheduler
Field Summary | |
---|---|
static String |
ENABLED_PROPERTY
|
static String |
GROUP_NAME
|
static String |
HOUR_PROPERTY
|
static String |
JOB_NAME
|
Constructor Summary | |
---|---|
QuartzBackupScheduler(org.quartz.Scheduler scheduler,
PropertyManager propertyManager,
BackupManager backupManager,
com.atlassian.event.api.EventPublisher eventPublisher,
BackupFileStore backupFileStore)
|
Method Summary | |
---|---|
protected org.quartz.JobDetail |
buildJobDetail()
|
protected org.quartz.Trigger |
buildTrigger(String cron)
|
void |
disable()
Disable automated backups. |
void |
enable()
Enable automated backups. |
int |
getHourToRun()
Return the time of day at which the automated backups are run |
boolean |
isEnabled()
Return whether automated backup is enabled |
void |
onApplicationStart(com.atlassian.config.lifecycle.events.ApplicationStartedEvent event)
|
protected void |
scheduleJob(int timeOfDay)
|
void |
setHourToRun(int timeOfDay)
Set the time of day at which the automated backups are run. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ENABLED_PROPERTY
public static final String HOUR_PROPERTY
public static final String JOB_NAME
public static final String GROUP_NAME
Constructor Detail |
---|
public QuartzBackupScheduler(org.quartz.Scheduler scheduler, PropertyManager propertyManager, BackupManager backupManager, com.atlassian.event.api.EventPublisher eventPublisher, BackupFileStore backupFileStore)
Method Detail |
---|
@EventListener public void onApplicationStart(com.atlassian.config.lifecycle.events.ApplicationStartedEvent event)
public boolean isEnabled()
BackupScheduler
isEnabled
in interface BackupScheduler
public void enable() throws ScheduledBackupException
BackupScheduler
enable
in interface BackupScheduler
ScheduledBackupException
- if there was a problem scheduling the automated backup jobpublic void disable() throws ScheduledBackupException
BackupScheduler
disable
in interface BackupScheduler
ScheduledBackupException
- if there was a problem scheduling the automated backup jobpublic int getHourToRun()
BackupScheduler
getHourToRun
in interface BackupScheduler
public void setHourToRun(int timeOfDay) throws ScheduledBackupException
BackupScheduler
setHourToRun
in interface BackupScheduler
timeOfDay
- a valid time (must be between 0 and 23)
ScheduledBackupException
- if there was a problem re-scheduling the automated backup jobprotected void scheduleJob(int timeOfDay) throws org.quartz.SchedulerException, ParseException
org.quartz.SchedulerException
ParseException
protected org.quartz.JobDetail buildJobDetail()
protected org.quartz.Trigger buildTrigger(String cron) throws ParseException
ParseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |