Search in sources :

Example 1 with IridaWorkflowsService

use of ca.corefacility.bioinformatics.irida.service.workflow.IridaWorkflowsService in project irida by phac-nml.

the class IridaWorkflowsServiceIT method setup.

@Before
public void setup() throws IOException, URISyntaxException, IridaWorkflowException {
    Path workflowVersion1DirectoryPath = Paths.get(TestAnalysis.class.getResource("workflows/TestAnalysis/1.0").toURI());
    Path workflowVersion2DirectoryPath = Paths.get(TestAnalysis.class.getResource("workflows/TestAnalysis/2.0").toURI());
    Path workflowPhylogenomicsDirectoryPath = Paths.get(TestAnalysis.class.getResource("workflows/AnalysisPhylogenomicsPipeline/0.1").toURI());
    iridaWorkflowsService = new IridaWorkflowsService(new IridaWorkflowSet(Sets.newHashSet()), new IridaWorkflowIdSet(Sets.newHashSet()));
    testWorkflow1v1 = iridaWorkflowLoaderService.loadIridaWorkflowFromDirectory(workflowVersion1DirectoryPath);
    testWorkflow1v2 = iridaWorkflowLoaderService.loadIridaWorkflowFromDirectory(workflowVersion2DirectoryPath);
    testWorkflowPhylogenomics = iridaWorkflowLoaderService.loadIridaWorkflowFromDirectory(workflowPhylogenomicsDirectoryPath);
}
Also used : Path(java.nio.file.Path) IridaWorkflowSet(ca.corefacility.bioinformatics.irida.model.workflow.config.IridaWorkflowSet) IridaWorkflowsService(ca.corefacility.bioinformatics.irida.service.workflow.IridaWorkflowsService) IridaWorkflowIdSet(ca.corefacility.bioinformatics.irida.model.workflow.config.IridaWorkflowIdSet) Before(org.junit.Before)

Example 2 with IridaWorkflowsService

use of ca.corefacility.bioinformatics.irida.service.workflow.IridaWorkflowsService in project irida by phac-nml.

the class ToolsListExporter method getDefaultWorkflows.

private static Map<AnalysisType, IridaWorkflow> getDefaultWorkflows() throws IridaWorkflowNotFoundException {
    AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
    context.getEnvironment().setActiveProfiles("dev");
    context.register(new Class[] { IridaApiPropertyPlaceholderConfig.class, IridaWorkflowsConfig.class });
    context.refresh();
    IridaWorkflowsService iridaWorkflowsService = context.getBean(IridaWorkflowsService.class);
    Map<AnalysisType, IridaWorkflow> workflows = iridaWorkflowsService.getAllDefaultWorkflowsByType(Sets.newHashSet(AnalysisType.executableAnalysisTypes()));
    context.close();
    return workflows;
}
Also used : AnalysisType(ca.corefacility.bioinformatics.irida.model.enums.AnalysisType) AnnotationConfigApplicationContext(org.springframework.context.annotation.AnnotationConfigApplicationContext) IridaWorkflow(ca.corefacility.bioinformatics.irida.model.workflow.IridaWorkflow) IridaWorkflowsService(ca.corefacility.bioinformatics.irida.service.workflow.IridaWorkflowsService)

Example 3 with IridaWorkflowsService

use of ca.corefacility.bioinformatics.irida.service.workflow.IridaWorkflowsService in project irida by phac-nml.

the class AnalysesListingServiceTest method init.

@Before
public void init() {
    analysisSubmissionService = mock(AnalysisSubmissionService.class);
    IridaWorkflowsService iridaWorkflowsService = mock(IridaWorkflowsService.class);
    UpdateAnalysisSubmissionPermission updateAnalysisPermission = mock(UpdateAnalysisSubmissionPermission.class);
    MessageSource messageSource = mock(MessageSource.class);
    analysesListingService = new AnalysesListingService(analysisSubmissionService, iridaWorkflowsService, updateAnalysisPermission, messageSource);
}
Also used : AnalysesListingService(ca.corefacility.bioinformatics.irida.ria.web.services.AnalysesListingService) AnalysisSubmissionService(ca.corefacility.bioinformatics.irida.service.AnalysisSubmissionService) IridaWorkflowsService(ca.corefacility.bioinformatics.irida.service.workflow.IridaWorkflowsService) MessageSource(org.springframework.context.MessageSource) UpdateAnalysisSubmissionPermission(ca.corefacility.bioinformatics.irida.security.permissions.analysis.UpdateAnalysisSubmissionPermission) Before(org.junit.Before)

Example 4 with IridaWorkflowsService

use of ca.corefacility.bioinformatics.irida.service.workflow.IridaWorkflowsService in project irida by phac-nml.

the class IridaWorkflowsServiceTest method setup.

@Before
public void setup() throws IridaWorkflowException {
    iridaWorkflow = IridaWorkflowTestBuilder.buildTestWorkflow(iridaWorkflowId, IridaWorkflowTestBuilder.Input.SINGLE, "reference");
    iridaWorkflow2 = IridaWorkflowTestBuilder.buildTestWorkflow(iridaWorkflowId2, IridaWorkflowTestBuilder.Input.SINGLE, "reference");
    iridaWorkflow3 = IridaWorkflowTestBuilder.buildTestWorkflow(iridaWorkflowId3, IridaWorkflowTestBuilder.Input.SINGLE, "reference");
    iridaWorkflowSet = new IridaWorkflowSet(Sets.newHashSet(iridaWorkflow, iridaWorkflow2));
    defaultIridaWorkflowIdSet = new IridaWorkflowIdSet(Sets.newHashSet());
    iridaWorkflowsService = new IridaWorkflowsService(iridaWorkflowSet, defaultIridaWorkflowIdSet);
}
Also used : IridaWorkflowSet(ca.corefacility.bioinformatics.irida.model.workflow.config.IridaWorkflowSet) IridaWorkflowsService(ca.corefacility.bioinformatics.irida.service.workflow.IridaWorkflowsService) IridaWorkflowIdSet(ca.corefacility.bioinformatics.irida.model.workflow.config.IridaWorkflowIdSet) Before(org.junit.Before)

Aggregations

IridaWorkflowsService (ca.corefacility.bioinformatics.irida.service.workflow.IridaWorkflowsService)4 Before (org.junit.Before)3 IridaWorkflowIdSet (ca.corefacility.bioinformatics.irida.model.workflow.config.IridaWorkflowIdSet)2 IridaWorkflowSet (ca.corefacility.bioinformatics.irida.model.workflow.config.IridaWorkflowSet)2 AnalysisType (ca.corefacility.bioinformatics.irida.model.enums.AnalysisType)1 IridaWorkflow (ca.corefacility.bioinformatics.irida.model.workflow.IridaWorkflow)1 AnalysesListingService (ca.corefacility.bioinformatics.irida.ria.web.services.AnalysesListingService)1 UpdateAnalysisSubmissionPermission (ca.corefacility.bioinformatics.irida.security.permissions.analysis.UpdateAnalysisSubmissionPermission)1 AnalysisSubmissionService (ca.corefacility.bioinformatics.irida.service.AnalysisSubmissionService)1 Path (java.nio.file.Path)1 MessageSource (org.springframework.context.MessageSource)1 AnnotationConfigApplicationContext (org.springframework.context.annotation.AnnotationConfigApplicationContext)1