Search in sources :

Example 1 with OdmFileCreation

use of org.akaza.openclinica.service.extract.OdmFileCreation in project OpenClinica by OpenClinica.

the class XsltTransformJob method initDependencies.

/**
     * Initializes the dependencies of this job with the components from the Spring application context.
     *
     * @param scheduler
     */
private void initDependencies(Scheduler scheduler) {
    try {
        ApplicationContext ctx = (ApplicationContext) scheduler.getContext().get("applicationContext");
        DataSource dataSource = ctx.getBean(DataSource.class);
        mailSender = ctx.getBean(OpenClinicaMailSender.class);
        auditEventDAO = ctx.getBean(AuditEventDAO.class);
        datasetDao = ctx.getBean(DatasetDAO.class);
        userAccountDao = ctx.getBean(UserAccountDAO.class);
        studyDao = new StudyDAO(dataSource);
        archivedDatasetFileDao = ctx.getBean(ArchivedDatasetFileDAO.class);
        generateFileService = ctx.getBean(GenerateExtractFileService.class);
        odmFileCreation = ctx.getBean(OdmFileCreation.class);
    } catch (SchedulerException e) {
        throw new IllegalStateException("Could not load dependencies from scheduler context", e);
    }
}
Also used : ArchivedDatasetFileDAO(org.akaza.openclinica.dao.extract.ArchivedDatasetFileDAO) ApplicationContext(org.springframework.context.ApplicationContext) GenerateExtractFileService(org.akaza.openclinica.service.extract.GenerateExtractFileService) SchedulerException(org.quartz.SchedulerException) OpenClinicaMailSender(org.akaza.openclinica.core.OpenClinicaMailSender) AuditEventDAO(org.akaza.openclinica.dao.admin.AuditEventDAO) OdmFileCreation(org.akaza.openclinica.service.extract.OdmFileCreation) DatasetDAO(org.akaza.openclinica.dao.extract.DatasetDAO) UserAccountDAO(org.akaza.openclinica.dao.login.UserAccountDAO) StudyDAO(org.akaza.openclinica.dao.managestudy.StudyDAO) DataSource(javax.sql.DataSource)

Aggregations

DataSource (javax.sql.DataSource)1 OpenClinicaMailSender (org.akaza.openclinica.core.OpenClinicaMailSender)1 AuditEventDAO (org.akaza.openclinica.dao.admin.AuditEventDAO)1 ArchivedDatasetFileDAO (org.akaza.openclinica.dao.extract.ArchivedDatasetFileDAO)1 DatasetDAO (org.akaza.openclinica.dao.extract.DatasetDAO)1 UserAccountDAO (org.akaza.openclinica.dao.login.UserAccountDAO)1 StudyDAO (org.akaza.openclinica.dao.managestudy.StudyDAO)1 GenerateExtractFileService (org.akaza.openclinica.service.extract.GenerateExtractFileService)1 OdmFileCreation (org.akaza.openclinica.service.extract.OdmFileCreation)1 SchedulerException (org.quartz.SchedulerException)1 ApplicationContext (org.springframework.context.ApplicationContext)1