task.addImported(imported);
}
if (toImport.isEmpty()) {
log.info("All attachments imported, will import wavelet");
for (ImportedAttachmentInfo info : task.getImported()) {
ImportedAttachment attachment = new ImportedAttachmentGsonImpl();
attachment.setRemoteId(info.getRemoteInfo().getRemoteId());
if (info.hasLocalId()) {
attachment.setLocalId(info.getLocalId());
}
waveletTask.addAttachment(attachment);
}
ImportTaskPayload payload = new ImportTaskPayloadGsonImpl();
payload.setImportWaveletTask(waveletTask);