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 ConfParamOps
confParamOps
protected boolean
disableQuartzInstance
protected DomainHolder
domainHolder
protected ImplementationDAO
implementationDAO
protected static Logger
LOG
protected ReportDAO
reportDAO
protected SchedulerFactoryBean
scheduler
protected SecurityProperties
securityProperties
protected TaskDAO
taskDAO
protected TaskUtilsFactory
taskUtilsFactory
-
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)
int
getOrder()
boolean
isRunning(org.quartz.JobKey jobKey)
protected boolean
isRunningElsewhere(org.quartz.JobKey jobKey)
protected boolean
isRunningHere(org.quartz.JobKey jobKey)
void
load(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 void
registerJob(String jobName, Class<? extends org.quartz.Job> jobClass, String cronExpression, Date startAt, Map<String,Object> jobMap)
void
setDisableQuartzInstance(boolean disableQuartzInstance)
void
unload(String domain)
Perform dispose operations on the given domain.void
unregister(Report report)
void
unregister(Task<?> task)
protected void
unregisterJob(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:
isRunning
in 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:
register
in interfaceJobManager
- Throws:
org.quartz.SchedulerException
-
register
public Map<String,Object> register(Report report, OffsetDateTime startAt, String executor) throws org.quartz.SchedulerException
- Specified by:
register
in 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:
unregister
in interfaceJobManager
-
unregister
public void unregister(Report report)
- Specified by:
unregister
in interfaceJobManager
-
load
@Transactional public void load(String domain, DataSource datasource)
Description copied from interface:SyncopeCoreLoader
Perform init operations on the given domain.- Specified by:
load
in interfaceSyncopeCoreLoader
- Parameters:
domain
- domain to initializedatasource
- db access for the given domain
-
unload
public void unload(String domain)
Description copied from interface:SyncopeCoreLoader
Perform dispose operations on the given domain.- Specified by:
unload
in interfaceSyncopeCoreLoader
- Parameters:
domain
- domain to unload
-
-