
Package ca.uhn.fhir.jpa.bulk.imprt.api
Interface IBulkDataImportSvc
public interface IBulkDataImportSvc
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionThis method is intended to be called from the job scheduler, and will begin execution on the next job in statusREADYvoidaddFilesToJob(String theJobId, List<BulkImportJobFileJson> theFiles) Add more files to a job inSTAGINGstatecreateNewJob(BulkImportJobJson theJobDescription, List<BulkImportJobFileJson> theInitialFiles) Create a new job inSTAGINGstate (meaning it won't yet be worked on and can be added to)voiddeleteJobFiles(String theJobId) Delete all input files associated with a particular jobFetch a given file by job IDGets the number of files available for a given Job IDgetFileDescription(String theJobId, int theFileIndex) Fetch just the file description for the given filegetJobStatus(String theJobId) Gets the job status for the given job.voidmarkJobAsReadyForActivation(String theJobId) voidsetJobToStatus(String theJobId, BulkImportJobStatusEnum theStatus) Updates the job status for the given jobvoidsetJobToStatus(String theJobId, BulkImportJobStatusEnum theStatus, String theStatusMessage) Updates the job status for the given job
-
Method Details
-
createNewJob
String createNewJob(BulkImportJobJson theJobDescription, @Nonnull List<BulkImportJobFileJson> theInitialFiles) Create a new job inSTAGINGstate (meaning it won't yet be worked on and can be added to) -
addFilesToJob
Add more files to a job inSTAGINGstate- Parameters:
theJobId- The job IDtheFiles- The files to add to the job
-
markJobAsReadyForActivation
Move a job fromSTAGINGstate toREADYstate, meaning that is is a candidate to be picked up for processing- Parameters:
theJobId- The job ID
-
activateNextReadyJob
This method is intended to be called from the job scheduler, and will begin execution on the next job in statusREADY- Returns:
- Returns true if a job was activated
-
setJobToStatus
Updates the job status for the given job -
setJobToStatus
Updates the job status for the given job -
getJobStatus
Gets the job status for the given job. -
fetchJob
Gets the number of files available for a given Job ID- Parameters:
theJobId- The job ID- Returns:
- The file count
-
fetchFile
Fetch a given file by job ID- Parameters:
theJobId- The job IDtheFileIndex- The index of the file within the job- Returns:
- The file
-
deleteJobFiles
Delete all input files associated with a particular job -
getFileDescription
Fetch just the file description for the given file
-