use of com.thinkbiganalytics.metadata.api.datasource.DatasourceNotFoundException in project kylo by Teradata.
the class JcrFeedProvider method ensureFeedDestination.
@Override
public FeedDestination ensureFeedDestination(Feed.ID feedId, com.thinkbiganalytics.metadata.api.datasource.Datasource.ID dsId) {
JcrFeed feed = (JcrFeed) findById(feedId);
FeedDestination source = feed.getDestination(dsId);
if (source == null) {
JcrDatasource datasource = (JcrDatasource) datasourceProvider.getDatasource(dsId);
if (datasource != null) {
JcrFeedDestination jcrDest = feed.ensureFeedDestination(datasource);
// save();
return jcrDest;
} else {
throw new DatasourceNotFoundException(dsId);
}
} else {
return source;
}
}
use of com.thinkbiganalytics.metadata.api.datasource.DatasourceNotFoundException in project kylo by Teradata.
the class JcrFeedProvider method ensureFeedSource.
@Override
public FeedSource ensureFeedSource(Feed.ID feedId, Datasource.ID dsId) {
JcrFeed feed = (JcrFeed) findById(feedId);
FeedSource source = feed.getSource(dsId);
if (source == null) {
JcrDatasource datasource = (JcrDatasource) datasourceProvider.getDatasource(dsId);
if (datasource != null) {
JcrFeedSource jcrSrc = feed.ensureFeedSource(datasource);
// save();
return jcrSrc;
} else {
throw new DatasourceNotFoundException(dsId);
}
} else {
return source;
}
}
Aggregations