Search in sources :

Example 16 with LatestSecurityPrice

use of name.abuchen.portfolio.model.LatestSecurityPrice in project portfolio by buchen.

the class HistoricalQuoteProviderPage method showSampleQuotes.

@Override
protected void showSampleQuotes(QuoteFeed feed, Exchange exchange) {
    Object cacheKey = buildCacheKey(exchange);
    List<LatestSecurityPrice> quotes = cacheQuotes.get(cacheKey);
    if (quotes != null) {
        tableSampleData.setInput(quotes);
        tableSampleData.refresh();
    } else {
        tableSampleData.setMessage(Messages.EditWizardQuoteFeedMsgLoading);
        tableSampleData.refresh();
        Job job = new LoadHistoricalQuotes(feed, exchange, cacheKey);
        job.setUser(true);
        job.schedule(150);
    }
}
Also used : LatestSecurityPrice(name.abuchen.portfolio.model.LatestSecurityPrice) Job(org.eclipse.core.runtime.jobs.Job)

Aggregations

LatestSecurityPrice (name.abuchen.portfolio.model.LatestSecurityPrice)16 IOException (java.io.IOException)8 SecurityPrice (name.abuchen.portfolio.model.SecurityPrice)6 ParseException (java.text.ParseException)5 Scanner (java.util.Scanner)5 ArrayList (java.util.ArrayList)4 LocalDate (java.time.LocalDate)3 DateTimeParseException (java.time.format.DateTimeParseException)3 Security (name.abuchen.portfolio.model.Security)3 HttpURLConnection (java.net.HttpURLConnection)2 URISyntaxException (java.net.URISyntaxException)2 URL (java.net.URL)2 DateTimeFormatter (java.time.format.DateTimeFormatter)2 PortfolioTransaction (name.abuchen.portfolio.model.PortfolioTransaction)2 RateLimitExceededException (name.abuchen.portfolio.util.RateLimitExceededException)2 Elements (org.jsoup.select.Elements)2 File (java.io.File)1 MessageFormat (java.text.MessageFormat)1 List (java.util.List)1 BiFunction (java.util.function.BiFunction)1