Search in sources :

Example 6 with UploadProgress

use of com.thinkbiganalytics.feedmgr.rest.model.UploadProgress in project kylo by Teradata.

the class TemplateImporter method initializeImportTemplateFromXml.

private void initializeImportTemplateFromXml() throws ImportException {
    try {
        UploadProgress progress = uploadProgressService.getUploadStatus(importOptions.getUploadKey());
        progress.setSections(ImportSection.sectionsForImportAsString(ImportType.TEMPLATE_XML));
        InputStream inputStream = new ByteArrayInputStream(file);
        this.importTemplate = ImportUtil.getNewNiFiTemplateImport(fileName, inputStream);
        importTemplate.setImportOptions(this.importTemplateOptions);
    } catch (IOException e) {
        throw new ImportException(e);
    }
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) ByteArrayInputStream(java.io.ByteArrayInputStream) InputStream(java.io.InputStream) IOException(java.io.IOException) UploadProgress(com.thinkbiganalytics.feedmgr.rest.model.UploadProgress)

Aggregations

UploadProgress (com.thinkbiganalytics.feedmgr.rest.model.UploadProgress)6 IOException (java.io.IOException)3 UploadProgressMessage (com.thinkbiganalytics.feedmgr.rest.model.UploadProgressMessage)2 ByteArrayInputStream (java.io.ByteArrayInputStream)2 InputStream (java.io.InputStream)2 ImportComponentOption (com.thinkbiganalytics.feedmgr.rest.model.ImportComponentOption)1 ImportFeedException (com.thinkbiganalytics.feedmgr.service.feed.ImportFeedException)1 ImportException (com.thinkbiganalytics.feedmgr.service.template.importing.ImportException)1