@Service(value="adminToolQuartzService") public class AdminToolQuartzServiceImpl extends Object implements AdminToolQuartzService
| Constructor and Description |
|---|
AdminToolQuartzServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
changeJob(JobTriggerTO triggerTO)
changes the job information and replaces the job
|
boolean |
changeTrigger(JobTriggerTO triggerTO,
boolean add)
changes (or adds) a trigger
|
void |
changeTriggerState(String groupName,
String jobName,
String triggerGroup,
String triggerName)
pausing either the found trigger or all triggers of found job
|
Collection<String> |
getCalendarNames() |
String |
getCronExpression(org.quartz.Trigger trigger,
String defaultValue) |
int |
getCurrentlyExecutingAmount(org.quartz.JobKey jobKey) |
Collection<JobTriggerTO> |
getInstructionSets() |
String |
getJobDescription(org.quartz.JobKey jobKey) |
List<String> |
getJobGroups() |
Set<org.quartz.JobKey> |
getJobKeys(String group) |
org.quartz.SchedulerMetaData |
getMetaData()
the scheduler configuration
|
JobTriggerTO |
getTriggerInfo(String groupName,
String jobName,
String triggerGroup,
String triggerName)
returns the job and possibly the trigger info if triggerGroup and triggerName has beeen specified
|
List<? extends org.quartz.Trigger> |
getTriggers(org.quartz.JobKey jobKey) |
String |
getTriggerState(org.quartz.JobKey jobKey,
org.quartz.Trigger trigger)
retuns "paused", "running" or "pending" depending on the triggers state
|
String |
getTriggerStateCssClass(org.quartz.JobKey jobKey,
org.quartz.Trigger trigger)
retuns "btn-warning" for paused trigger, "btn-success" for running trigger else "btn-info"
|
void |
interruptJob(String jobGroup,
String jobName)
interrupts all triggers of job
|
void |
interruptTrigger(String jobGroup,
String jobName,
String triggerGroup,
String triggerName)
interrupts the trigger i found
|
boolean |
isCronTrigger(org.quartz.Trigger trigger) |
boolean |
isCurrentlyRunning(org.quartz.JobKey jobKey,
org.quartz.Trigger trigger)
returns if the trigger is running currently
|
boolean |
isInteruptable(org.quartz.JobKey jobKey) |
boolean |
isOnePaused(org.quartz.JobKey jobKey) |
boolean |
isPaused(org.quartz.JobKey jobKey) |
boolean |
isPaused(org.quartz.Trigger trigger) |
boolean |
isPrevGoupNotEq(String actualGroup)
checks if the previous stored group is not equals the actual one or if previous is empty
requires to use the AdminToolQuartzService.setPrevGroup(String) method |
boolean |
isPrevJobNotEq(String actualJob)
checks if the previous stored jobName is not equals the actual one or if previous is empty
requires to use the AdminToolQuartzService.setPrevJob(String) method |
boolean |
isSchedulerRunning() |
boolean |
isStateful(org.quartz.JobKey jobKey) |
boolean |
removeTrigger(String groupName,
String jobName,
String triggerGroup,
String triggerName)
removes trigger from job
|
boolean |
setPrevGroup(String prevGroup)
sets the given group as previous group
dirty hack to call this method from thymeleaf to get control over row span |
boolean |
setPrevJob(String prevJob)
sets the given jobName as previous jobName
dirty hack to call this method from thymeleaf to get control over row span |
void |
startScheduler()
starts the scheduler process
|
void |
stopScheduler()
stops the scheduler process
|
void |
triggerJob(String groupName,
String jobName)
executes the job immediately with a custom trigger
|
public void startScheduler()
AdminToolQuartzServicestartScheduler in interface AdminToolQuartzServicepublic void stopScheduler()
AdminToolQuartzServicestopScheduler in interface AdminToolQuartzServicepublic boolean isSchedulerRunning()
isSchedulerRunning in interface AdminToolQuartzServicepublic org.quartz.SchedulerMetaData getMetaData()
throws org.quartz.SchedulerException
AdminToolQuartzServicegetMetaData in interface AdminToolQuartzServiceorg.quartz.SchedulerExceptionpublic List<String> getJobGroups() throws org.quartz.SchedulerException
getJobGroups in interface AdminToolQuartzServiceorg.quartz.SchedulerExceptionpublic boolean isPrevGoupNotEq(String actualGroup)
AdminToolQuartzServiceAdminToolQuartzService.setPrevGroup(String) methodisPrevGoupNotEq in interface AdminToolQuartzServiceactualGroup - the actual job grouppublic boolean setPrevGroup(String prevGroup)
AdminToolQuartzServicesetPrevGroup in interface AdminToolQuartzServicepublic boolean isPrevJobNotEq(String actualJob)
AdminToolQuartzServiceAdminToolQuartzService.setPrevJob(String) methodisPrevJobNotEq in interface AdminToolQuartzServicepublic boolean setPrevJob(String prevJob)
AdminToolQuartzServicesetPrevJob in interface AdminToolQuartzServicepublic Set<org.quartz.JobKey> getJobKeys(String group) throws org.quartz.SchedulerException
getJobKeys in interface AdminToolQuartzServicegroup - the actual job grouporg.quartz.SchedulerExceptionpublic String getJobDescription(org.quartz.JobKey jobKey) throws org.quartz.SchedulerException
getJobDescription in interface AdminToolQuartzServicejobKey - the actual job keyorg.quartz.SchedulerExceptionpublic List<? extends org.quartz.Trigger> getTriggers(org.quartz.JobKey jobKey) throws org.quartz.SchedulerException
getTriggers in interface AdminToolQuartzServicejobKey - the actual job keyorg.quartz.SchedulerExceptionpublic int getCurrentlyExecutingAmount(org.quartz.JobKey jobKey)
throws org.quartz.SchedulerException
getCurrentlyExecutingAmount in interface AdminToolQuartzServicejobKey - the actual job keyorg.quartz.SchedulerExceptionpublic boolean isPaused(org.quartz.JobKey jobKey)
throws org.quartz.SchedulerException
isPaused in interface AdminToolQuartzServicejobKey - the actual job keyorg.quartz.SchedulerExceptionpublic boolean isOnePaused(org.quartz.JobKey jobKey)
throws org.quartz.SchedulerException
isOnePaused in interface AdminToolQuartzServicejobKey - the actual job keyorg.quartz.SchedulerExceptionpublic boolean isPaused(org.quartz.Trigger trigger)
throws org.quartz.SchedulerException
isPaused in interface AdminToolQuartzServicetrigger - the triggerorg.quartz.SchedulerExceptionpublic String getTriggerStateCssClass(org.quartz.JobKey jobKey, org.quartz.Trigger trigger) throws org.quartz.SchedulerException
AdminToolQuartzServicegetTriggerStateCssClass in interface AdminToolQuartzServicejobKey - the job keytrigger - the triggerorg.quartz.SchedulerExceptionpublic String getTriggerState(org.quartz.JobKey jobKey, org.quartz.Trigger trigger) throws org.quartz.SchedulerException
AdminToolQuartzServicegetTriggerState in interface AdminToolQuartzServicejobKey - the job keytrigger - the triggerorg.quartz.SchedulerExceptionpublic boolean isCurrentlyRunning(org.quartz.JobKey jobKey,
org.quartz.Trigger trigger)
throws org.quartz.SchedulerException
AdminToolQuartzServiceisCurrentlyRunning in interface AdminToolQuartzServicejobKey - the job keytrigger - the triggerorg.quartz.SchedulerExceptionpublic String getCronExpression(org.quartz.Trigger trigger, String defaultValue)
getCronExpression in interface AdminToolQuartzServicetrigger - the actual triggerdefaultValue - a default value to be returned, ifpublic boolean isCronTrigger(org.quartz.Trigger trigger)
isCronTrigger in interface AdminToolQuartzServicepublic boolean isInteruptable(org.quartz.JobKey jobKey)
throws org.quartz.SchedulerException
isInteruptable in interface AdminToolQuartzServiceInterruptableJob interfaceorg.quartz.SchedulerExceptionpublic boolean isStateful(org.quartz.JobKey jobKey)
throws org.quartz.SchedulerException
isStateful in interface AdminToolQuartzServiceStatefulJob interfaceorg.quartz.SchedulerExceptionpublic void interruptJob(String jobGroup, String jobName) throws org.quartz.SchedulerException
AdminToolQuartzServiceinterruptJob in interface AdminToolQuartzServicejobGroup - the jobGroupjobName - the jobNameorg.quartz.SchedulerExceptionpublic void interruptTrigger(String jobGroup, String jobName, String triggerGroup, String triggerName) throws org.quartz.SchedulerException
AdminToolQuartzServiceinterruptTrigger in interface AdminToolQuartzServiceorg.quartz.SchedulerExceptionpublic void changeTriggerState(String groupName, String jobName, String triggerGroup, String triggerName) throws org.quartz.SchedulerException
AdminToolQuartzServicechangeTriggerState in interface AdminToolQuartzServicetriggerGroup - (optional)triggerName - (optional)org.quartz.SchedulerExceptionpublic void triggerJob(String groupName, String jobName) throws org.quartz.SchedulerException
AdminToolQuartzServicetriggerJob in interface AdminToolQuartzServiceorg.quartz.SchedulerExceptionpublic boolean removeTrigger(String groupName, String jobName, String triggerGroup, String triggerName) throws org.quartz.SchedulerException
AdminToolQuartzServiceremoveTrigger in interface AdminToolQuartzServiceorg.quartz.SchedulerExceptionpublic JobTriggerTO getTriggerInfo(String groupName, String jobName, String triggerGroup, String triggerName) throws org.quartz.SchedulerException
AdminToolQuartzServicegetTriggerInfo in interface AdminToolQuartzServicetriggerGroup - (optional)triggerName - (optional)org.quartz.SchedulerExceptionpublic Collection<String> getCalendarNames() throws org.quartz.SchedulerException
getCalendarNames in interface AdminToolQuartzServiceorg.quartz.SchedulerExceptionpublic Collection<JobTriggerTO> getInstructionSets()
getInstructionSets in interface AdminToolQuartzServiceJobTriggerTO.TriggerType.CRON,
JobTriggerTO.TriggerType.SIMPLE,JobTriggerTO.TriggerType.CALENDAR,JobTriggerTO.TriggerType.DAILY,public boolean changeJob(JobTriggerTO triggerTO) throws org.quartz.SchedulerException
AdminToolQuartzServicechangeJob in interface AdminToolQuartzServiceorg.quartz.SchedulerExceptionpublic boolean changeTrigger(JobTriggerTO triggerTO, boolean add) throws org.quartz.SchedulerException
AdminToolQuartzServicechangeTrigger in interface AdminToolQuartzServiceadd - true: if a new trigger should be added (will only work, if there is no other trigger with same identifier)org.quartz.SchedulerExceptionCopyright © 2016. All rights reserved.