use of name.abuchen.portfolio.online.impl.AlphavantageQuoteFeed in project portfolio by buchen.
the class Preference2EnvAddon method setAlphavantageApiKey.
@Inject
@Optional
public void setAlphavantageApiKey(@Preference(value = UIConstants.Preferences.ALPHAVANTAGE_API_KEY) String alphavantageApiKey) {
// this is a hack to pass the eclipse-based preference via environment
// to the AlphavantageQuoteFeed implementation which is not created via
// dependency injection but via Java Service Locator.
AlphavantageQuoteFeed quoteFeed = (AlphavantageQuoteFeed) Factory.getQuoteFeedProvider(AlphavantageQuoteFeed.ID);
quoteFeed.setApiKey(alphavantageApiKey);
}
Aggregations