Class ProjectSynchronizationService
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.service.remote.ProjectSynchronizationService
-
@Service public class ProjectSynchronizationService extends java.lang.Object
Service class to run a project synchornization task. Ths class will be responsible for communicating with Remote IRIDA installations and pulling metadata and sequencing data into the local installation.
-
-
Constructor Summary
Constructors Constructor Description ProjectSynchronizationService(ProjectService projectService, SampleService sampleService, SequencingObjectService objectService, MetadataTemplateService metadataTemplateService, GenomeAssemblyService assemblyService, ProjectRemoteService projectRemoteService, SampleRemoteService sampleRemoteService, SingleEndSequenceFileRemoteService singleEndRemoteService, SequenceFilePairRemoteService pairRemoteService, GenomeAssemblyRemoteService assemblyRemoteService, Fast5ObjectRemoteService fast5ObjectRemoteService, RemoteAPITokenService tokenService, EmailController emailController)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
findMarkedProjectsToSync()
Find projects which should be synchronized and launch a synchornization task.void
findProjectsToMark()
Method checking for remote projects that have passed their frequency time.void
syncAssembly(UploadedAssembly assembly, Sample sample)
Synchronize a givenUploadedAssembly
to the local installationvoid
syncFast5File(Fast5Object fast5Object, Sample sample)
Synchronize a givenFast5Object
to the local installationjava.util.List<ProjectSynchronizationException>
syncSample(Sample sample, Project project, java.util.Map<java.lang.String,Sample> existingSamples)
Synchronize a givenSample
to the local installation.void
syncSampleMetadata(Sample remoteSample, Sample localSample)
Synchronize the given sample's metadatavoid
syncSequenceFilePair(SequenceFilePair pair, Sample sample)
Synchronize a givenSequenceFilePair
to the local installation.void
syncSingleEndSequenceFile(SingleEndSequenceFile file, Sample sample)
Synchronize a givenSingleEndSequenceFile
to the local installation
-
-
-
Constructor Detail
-
ProjectSynchronizationService
@Autowired public ProjectSynchronizationService(ProjectService projectService, SampleService sampleService, SequencingObjectService objectService, MetadataTemplateService metadataTemplateService, GenomeAssemblyService assemblyService, ProjectRemoteService projectRemoteService, SampleRemoteService sampleRemoteService, SingleEndSequenceFileRemoteService singleEndRemoteService, SequenceFilePairRemoteService pairRemoteService, GenomeAssemblyRemoteService assemblyRemoteService, Fast5ObjectRemoteService fast5ObjectRemoteService, RemoteAPITokenService tokenService, EmailController emailController)
-
-
Method Detail
-
findProjectsToMark
public void findProjectsToMark()
Method checking for remote projects that have passed their frequency time. It will mark them asRemoteStatus.SyncStatus.MARKED
-
findMarkedProjectsToSync
public void findMarkedProjectsToSync()
Find projects which should be synchronized and launch a synchornization task.
-
syncSample
public java.util.List<ProjectSynchronizationException> syncSample(Sample sample, Project project, java.util.Map<java.lang.String,Sample> existingSamples)
Synchronize a givenSample
to the local installation.- Parameters:
sample
- theSample
to synchronize. This should have been read from a remote api.project
- TheProject
theSample
belongs in.existingSamples
- A map of samples that have already been synchronized. These will be checked to see if they've been updated- Returns:
- A list of
ProjectSynchronizationException
s, empty if no errors.
-
syncSampleMetadata
public void syncSampleMetadata(Sample remoteSample, Sample localSample)
Synchronize the given sample's metadata- Parameters:
remoteSample
- the sample read from the remote apilocalSample
- the local sample being saved
-
syncSingleEndSequenceFile
public void syncSingleEndSequenceFile(SingleEndSequenceFile file, Sample sample)
Synchronize a givenSingleEndSequenceFile
to the local installation- Parameters:
file
- theSingleEndSequenceFile
to syncsample
- theSample
to add the file to
-
syncFast5File
public void syncFast5File(Fast5Object fast5Object, Sample sample)
Synchronize a givenFast5Object
to the local installation- Parameters:
fast5Object
- theFast5Object
to syncsample
- theSample
to add the file to
-
syncAssembly
public void syncAssembly(UploadedAssembly assembly, Sample sample)
Synchronize a givenUploadedAssembly
to the local installation- Parameters:
assembly
- theUploadedAssembly
to syncsample
- theSample
to add the assembly to
-
syncSequenceFilePair
public void syncSequenceFilePair(SequenceFilePair pair, Sample sample)
Synchronize a givenSequenceFilePair
to the local installation.- Parameters:
pair
- theSequenceFilePair
to sync. This should have been read from a remote api.sample
- TheSample
to add the pair to.
-
-