use of com.thinkbiganalytics.metadata.modeshape.datasource.JcrDatasource 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