resp.setLoadStatus(FAILED);
resp.setMessage(ex.getMessage());
return resp;
}
LoadKAMResult rslt;
try {
rslt = kamCacheService.loadKamWithResult(kamInfo, filter);
} catch (KamCacheServiceException e) {
String msg = getFirstMessage(e);
LoadKamResponse resp = OBJECT_FACTORY.createLoadKamResponse();
resp.setLoadStatus(FAILED);
resp.setMessage(msg);
return resp;
}
LoadKamResponse resp = OBJECT_FACTORY.createLoadKamResponse();
if (rslt.getStatus() == LOADING) {
resp.setLoadStatus(KAMLoadStatus.IN_PROCESS);
return resp;
}
KamHandle kamHandle = OBJECT_FACTORY.createKamHandle();
kamHandle.setHandle(rslt.getHandle());
resp.setHandle(kamHandle);
resp.setLoadStatus(KAMLoadStatus.COMPLETE);
return resp;
}