Class AbstractReportJobDelegate
- java.lang.Object
-
- org.apache.syncope.core.provisioning.java.job.report.AbstractReportJobDelegate
-
- All Implemented Interfaces:
JobDelegate,ReportJobDelegate
- Direct Known Subclasses:
SampleReportJobDelegate
public abstract class AbstractReportJobDelegate extends Object implements ReportJobDelegate
-
-
Field Summary
Fields Modifier and Type Field Description protected AuditManagerauditManagerAudit manager.protected ReportConfconfprotected EntityFactoryentityFactoryprotected booleaninterruptprotected booleaninterruptedprotected static LoggerLOGprotected NotificationManagernotificationManagerNotification manager.protected ApplicationEventPublisherpublisherprotected ReportreportThe actual report to be executed.protected ReportDAOreportDAOReport DAO.protected ReportDataBinderreportDataBinderprotected SecurityPropertiessecurityProperties-
Fields inherited from interface org.apache.syncope.core.provisioning.api.job.JobDelegate
OPERATION_ID
-
-
Constructor Summary
Constructors Constructor Description AbstractReportJobDelegate()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract StringdoExecute(boolean dryRun, OutputStream os, String executor, org.quartz.JobExecutionContext context)The actual execution, delegated to child classes.voidexecute(String reportKey, boolean dryRun, org.quartz.JobExecutionContext context)Executes a Quartz Job to run the given Report.voidinterrupt()booleanisInterrupted()voidsetConf(ReportConf conf)Optional configuration.protected voidsetStatus(String status)
-
-
-
Field Detail
-
LOG
protected static final Logger LOG
-
securityProperties
@Autowired protected SecurityProperties securityProperties
-
report
protected Report report
The actual report to be executed.
-
conf
protected ReportConf conf
-
reportDAO
@Autowired protected ReportDAO reportDAO
Report DAO.
-
entityFactory
@Autowired protected EntityFactory entityFactory
-
reportDataBinder
@Autowired protected ReportDataBinder reportDataBinder
-
notificationManager
@Autowired protected NotificationManager notificationManager
Notification manager.
-
auditManager
@Autowired protected AuditManager auditManager
Audit manager.
-
publisher
@Autowired protected ApplicationEventPublisher publisher
-
interrupt
protected boolean interrupt
-
interrupted
protected boolean interrupted
-
-
Method Detail
-
setConf
public void setConf(ReportConf conf)
Description copied from interface:ReportJobDelegateOptional configuration.- Specified by:
setConfin interfaceReportJobDelegate- Parameters:
conf- configuration
-
setStatus
protected void setStatus(String status)
-
interrupt
public void interrupt()
- Specified by:
interruptin interfaceJobDelegate
-
isInterrupted
public boolean isInterrupted()
- Specified by:
isInterruptedin interfaceJobDelegate
-
execute
@Transactional public void execute(String reportKey, boolean dryRun, org.quartz.JobExecutionContext context) throws org.quartz.JobExecutionException
Description copied from interface:ReportJobDelegateExecutes a Quartz Job to run the given Report.- Specified by:
executein interfaceReportJobDelegate- Parameters:
reportKey- Report key to rundryRun- indicates if execution shall be simulated with no actual changescontext- Quartz' execution context, can be used to pass parameters to the job- Throws:
org.quartz.JobExecutionException- if anything goes wrong
-
doExecute
protected abstract String doExecute(boolean dryRun, OutputStream os, String executor, org.quartz.JobExecutionContext context) throws org.quartz.JobExecutionException
The actual execution, delegated to child classes.- Parameters:
dryRun- whether to actually touch the dataos- where to stream report execution's dataexecutor- the user executing this reportcontext- Quartz' execution context, can be used to pass parameters to the job- Returns:
- the report execution status to be set
- Throws:
org.quartz.JobExecutionException- if anything goes wrong
-
-