Class DefaultJobManager
- java.lang.Object
-
- org.apache.syncope.core.provisioning.java.job.DefaultJobManager
-
- All Implemented Interfaces:
SyncopeCoreLoader,JobManager,Ordered
public class DefaultJobManager extends Object implements JobManager, SyncopeCoreLoader
-
-
Field Summary
Fields Modifier and Type Field Description protected ConfParamOpsconfParamOpsprotected booleandisableQuartzInstanceprotected DomainHolderdomainHolderprotected ImplementationDAOimplementationDAOprotected static LoggerLOGprotected ReportDAOreportDAOprotected SchedulerFactoryBeanschedulerprotected SecurityPropertiessecurityPropertiesprotected TaskDAOtaskDAOprotected TaskUtilsFactorytaskUtilsFactory-
Fields inherited from interface org.apache.syncope.core.provisioning.api.job.JobManager
DELEGATE_IMPLEMENTATION, DOMAIN_KEY, DRY_RUN_JOBDETAIL_KEY, EXECUTOR_KEY, NOTIFICATION_JOB, REPORT_KEY, TASK_KEY, TASK_TYPE
-
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
-
Constructor Summary
Constructors Constructor Description DefaultJobManager(DomainHolder domainHolder, SchedulerFactoryBean scheduler, TaskDAO taskDAO, ReportDAO reportDAO, ImplementationDAO implementationDAO, TaskUtilsFactory taskUtilsFactory, ConfParamOps confParamOps, SecurityProperties securityProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,Object>createJobMapForExecutionContext(String executor)intgetOrder()booleanisRunning(org.quartz.JobKey jobKey)protected booleanisRunningElsewhere(org.quartz.JobKey jobKey)protected booleanisRunningHere(org.quartz.JobKey jobKey)voidload(String domain, DataSource datasource)Perform init operations on the given domain.Map<String,Object>register(Report report, OffsetDateTime startAt, String executor)Map<String,Object>register(SchedTask task, OffsetDateTime startAt, String executor)protected voidregisterJob(String jobName, Class<? extends org.quartz.Job> jobClass, String cronExpression, Date startAt, Map<String,Object> jobMap)voidsetDisableQuartzInstance(boolean disableQuartzInstance)voidunload(String domain)Perform dispose operations on the given domain.voidunregister(Report report)voidunregister(Task<?> task)protected voidunregisterJob(String jobName)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.syncope.core.persistence.api.SyncopeCoreLoader
load, unload
-
-
-
-
Field Detail
-
LOG
protected static final Logger LOG
-
domainHolder
protected final DomainHolder domainHolder
-
scheduler
protected final SchedulerFactoryBean scheduler
-
taskDAO
protected final TaskDAO taskDAO
-
reportDAO
protected final ReportDAO reportDAO
-
implementationDAO
protected final ImplementationDAO implementationDAO
-
taskUtilsFactory
protected final TaskUtilsFactory taskUtilsFactory
-
confParamOps
protected final ConfParamOps confParamOps
-
securityProperties
protected final SecurityProperties securityProperties
-
disableQuartzInstance
protected boolean disableQuartzInstance
-
-
Constructor Detail
-
DefaultJobManager
public DefaultJobManager(DomainHolder domainHolder, SchedulerFactoryBean scheduler, TaskDAO taskDAO, ReportDAO reportDAO, ImplementationDAO implementationDAO, TaskUtilsFactory taskUtilsFactory, ConfParamOps confParamOps, SecurityProperties securityProperties)
-
-
Method Detail
-
setDisableQuartzInstance
public void setDisableQuartzInstance(boolean disableQuartzInstance)
-
isRunningHere
protected boolean isRunningHere(org.quartz.JobKey jobKey) throws org.quartz.SchedulerException- Throws:
org.quartz.SchedulerException
-
isRunningElsewhere
protected boolean isRunningElsewhere(org.quartz.JobKey jobKey) throws org.quartz.SchedulerException- Throws:
org.quartz.SchedulerException
-
isRunning
public boolean isRunning(org.quartz.JobKey jobKey) throws org.quartz.SchedulerException- Specified by:
isRunningin interfaceJobManager- Throws:
org.quartz.SchedulerException
-
registerJob
protected void registerJob(String jobName, Class<? extends org.quartz.Job> jobClass, String cronExpression, Date startAt, Map<String,Object> jobMap) throws org.quartz.SchedulerException
- Throws:
org.quartz.SchedulerException
-
register
public Map<String,Object> register(SchedTask task, OffsetDateTime startAt, String executor) throws org.quartz.SchedulerException
- Specified by:
registerin interfaceJobManager- Throws:
org.quartz.SchedulerException
-
register
public Map<String,Object> register(Report report, OffsetDateTime startAt, String executor) throws org.quartz.SchedulerException
- Specified by:
registerin interfaceJobManager- Throws:
org.quartz.SchedulerException
-
createJobMapForExecutionContext
protected Map<String,Object> createJobMapForExecutionContext(String executor)
-
unregisterJob
protected void unregisterJob(String jobName)
-
unregister
public void unregister(Task<?> task)
- Specified by:
unregisterin interfaceJobManager
-
unregister
public void unregister(Report report)
- Specified by:
unregisterin interfaceJobManager
-
load
@Transactional public void load(String domain, DataSource datasource)
Description copied from interface:SyncopeCoreLoaderPerform init operations on the given domain.- Specified by:
loadin interfaceSyncopeCoreLoader- Parameters:
domain- domain to initializedatasource- db access for the given domain
-
unload
public void unload(String domain)
Description copied from interface:SyncopeCoreLoaderPerform dispose operations on the given domain.- Specified by:
unloadin interfaceSyncopeCoreLoader- Parameters:
domain- domain to unload
-
-