Package ca.uhn.fhir.jpa.bulk.imprt.api
Interface IBulkDataImportSvc
public interface IBulkDataImportSvc
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionThis method is intended to be called from the job scheduler, and will begin execution on the next job in statusREADY
void
addFilesToJob
(String theJobId, List<BulkImportJobFileJson> theFiles) Add more files to a job inSTAGING
statecreateNewJob
(BulkImportJobJson theJobDescription, List<BulkImportJobFileJson> theInitialFiles) Create a new job inSTAGING
state (meaning it won't yet be worked on and can be added to)void
deleteJobFiles
(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.void
markJobAsReadyForActivation
(String theJobId) void
setJobToStatus
(String theJobId, BulkImportJobStatusEnum theStatus) Updates the job status for the given jobvoid
setJobToStatus
(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 inSTAGING
state (meaning it won't yet be worked on and can be added to) -
addFilesToJob
Add more files to a job inSTAGING
state- Parameters:
theJobId
- The job IDtheFiles
- The files to add to the job
-
markJobAsReadyForActivation
Move a job fromSTAGING
state toREADY
state, 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
-