use of com.b2international.snowowl.snomed.core.rest.domain.SnomedRf2ImportConfiguration in project snow-owl by b2ihealthcare.
the class SnomedRf2ImportRestService method toRf2ImportConfiguration.
private SnomedRf2ImportConfiguration toRf2ImportConfiguration(RemoteJobEntry job) {
ApiError error = null;
ImportResponse response = null;
ObjectMapper mapper = ApplicationContext.getServiceForClass(ObjectMapper.class);
if (RemoteJobState.FAILED == job.getState()) {
error = job.getResultAs(mapper, ApiError.class);
} else if (job.isSuccessful()) {
response = job.getResultAs(mapper, ImportResponse.class);
}
return new SnomedRf2ImportConfiguration(IDs.sha1(job.getId()), job.getState(), error, response);
}
Aggregations