public DataValidationEvent [ ] validateDataSourceBackendData ( ) throws DataSourceFailedDataValidationException , DataSourceValidationIncompleteException { KnowledgeSource knowledgeSource = getKnowledgeSource ( ) ; List < DataValidationEvent > validationEvents = new ArrayList <> ( ) ; try { for ( DataSourceBackend backend : getDataSource ( ) . getBackends ( ) ) { CollectionUtils . addAll ( validationEvents , backend . validateData ( knowledgeSource ) ) ; } } catch ( DataSourceBackendFailedDataValidationException ex ) { throw new DataSourceFailedDataValidationException ( "Data source failed validation" , ex , validationEvents . toArray ( new DataValidationEvent [ validationEvents . size ( ) ] ) ) ; } catch ( KnowledgeSourceReadException ex ) { throw new DataSourceValidationIncompleteException ( "An error occurred during validation" , ex ) ; } return validationEvents . toArray ( new DataValidationEvent [ validationEvents . size ( ) ] ) ; }
Runs each data source backend s data validation routine .