Search in sources :

Example 1 with AbstractValidateImportTemplate

use of com.thinkbiganalytics.feedmgr.service.template.importing.validation.AbstractValidateImportTemplate in project kylo by Teradata.

the class TemplateImporter method validate.

public ImportTemplate validate() {
    try {
        init();
        AbstractValidateImportTemplate validateImportTemplate = validateImportTemplateFactory.apply(this.importTemplate, this.importTemplateOptions, importType);
        validateImportTemplate.validate();
    } catch (NifiConnectionException e) {
        throw e;
    } catch (Exception e) {
        this.overallStatusMessage.update("An Error occurred " + e.getMessage(), false);
        throw new TemplateImportException("Error importing template  " + fileName + ".  " + e.getMessage());
    }
    overallStatusMessage.update("Validated template for import ", this.importTemplate.isValid());
    return this.importTemplate;
}
Also used : NifiConnectionException(com.thinkbiganalytics.nifi.rest.client.NifiConnectionException) AbstractValidateImportTemplate(com.thinkbiganalytics.feedmgr.service.template.importing.validation.AbstractValidateImportTemplate) TemplateImportException(com.thinkbiganalytics.nifi.feedmgr.TemplateImportException) NifiConnectionException(com.thinkbiganalytics.nifi.rest.client.NifiConnectionException) IOException(java.io.IOException) TemplateImportException(com.thinkbiganalytics.nifi.feedmgr.TemplateImportException)

Aggregations

AbstractValidateImportTemplate (com.thinkbiganalytics.feedmgr.service.template.importing.validation.AbstractValidateImportTemplate)1 TemplateImportException (com.thinkbiganalytics.nifi.feedmgr.TemplateImportException)1 NifiConnectionException (com.thinkbiganalytics.nifi.rest.client.NifiConnectionException)1 IOException (java.io.IOException)1