Interface SportDataProvider

All Known Implementing Classes:
SportDataProviderImpl

public interface SportDataProvider
Defines methods implemented by classes used to provide sport related data (sports, tournaments, competitions, ...)
  • Method Details

    • getSports

      List<Sport> getSports()
      Returns all the available sports (the returned data is translated in the configured Locales using the UofConfigurationImpl)
      Returns:
      - all the available sports
    • getSports

      List<Sport> getSports(Locale locale)
      Returns all the available sports (the returned data is translated in the specified Locale)
      Parameters:
      locale - - the Locale in which to provide the data
      Returns:
      - all the available sports translated in the specified locale
    • getActiveTournaments

      List<SportEvent> getActiveTournaments()
      Returns all the active tournaments (the returned data is translated in the default locale configured with the UofConfigurationImpl) (possible types: BasicTournament, Tournament, Stage)
      Returns:
      - all the active tournaments
    • getActiveTournaments

      List<SportEvent> getActiveTournaments(Locale locale)
      Returns all the active tournaments (the returned data is translated in the specified Locale) (possible types: BasicTournament, Tournament, Stage)
      Parameters:
      locale - - the Locale in which to provide the data
      Returns:
      - all the active tournaments translated in the specified locale
    • getActiveTournaments

      List<SportEvent> getActiveTournaments(String sportName)
      Returns all the active tournaments of a specific sport (the returned data is translated in the default locale configured with the UofConfigurationImpl) (possible types: BasicTournament, Tournament, Stage)
      Parameters:
      sportName - - the specific sport name
      Returns:
      - all the active tournaments of a specific sport
    • getActiveTournaments

      List<SportEvent> getActiveTournaments(String sportName, Locale locale)
      Returns all the active tournaments of a specific sport (the returned data is translated in the specified Locale) (possible types: BasicTournament, Tournament, Stage)
      Parameters:
      sportName - - the specific sport name
      locale - - the Locale in which to provide the data
      Returns:
      - all the active tournaments of a specific sport translated in the specified locale
    • getCompetitionsFor

      List<Competition> getCompetitionsFor(Date date)
      Returns a list of all competitions scheduled on the specified date (the returned data is translated in the configured Locales using the UofConfigurationImpl)
      Parameters:
      date - - the date for which to list all active competitions
      Returns:
      - a list of all competitions scheduled on the specified date
    • getCompetitionsFor

      List<Competition> getCompetitionsFor(Date date, Locale locale)
      Returns a list of all competitions scheduled on the specified date (the returned data is translated in the specified Locale)
      Parameters:
      date - - the date for which to list all active competitions
      locale - - the Locale in which to provide the data
      Returns:
      - a list of all competitions scheduled on the specified date (the data is translated in the provided locale)
    • getLiveCompetitions

      List<Competition> getLiveCompetitions()
      Returns all the competitions that are currently live (the returned data is translated in the configured Locales using the UofConfigurationImpl)
      Returns:
      - all the competitions that are currently live
    • getLiveCompetitions

      List<Competition> getLiveCompetitions(Locale locale)
      Returns all the competitions that are currently live (the returned data is translated in the specified Locale)
      Parameters:
      locale - - the Locale in which to provide the data
      Returns:
      - all the competitions that are currently live (the data is translated in the provided locale)
    • getSportEvent

      SportEvent getSportEvent(Urn id)
      Returns the specified sport event (the returned data is translated in the configured Locales using the UofConfigurationImpl)
      Parameters:
      id - - an Urn identifier specifying the sport event
      Returns:
      - the specified sport event
    • getSportEvent

      SportEvent getSportEvent(Urn id, Locale locale)
      Returns the specified sport event (the returned data is translated in the specified Locale)
      Parameters:
      id - - an Urn identifier specifying the requested long term event
      locale - - the Locale in which to provide the data
      Returns:
      - the specified sport event translated in the provided locale
    • getLongTermEvent

      LongTermEvent getLongTermEvent(Urn id)
      Returns the specified long term event (the returned data is translated in the configured Locales using the UofConfigurationImpl)
      Parameters:
      id - - an Urn identifier specifying the requested long term event
      Returns:
      - the specified tournament
    • getLongTermEvent

      LongTermEvent getLongTermEvent(Urn id, Locale locale)
      Returns the specified long term event (the returned data is translated in the specified Locale)
      Parameters:
      id - - an Urn identifier specifying the requested long term event
      locale - - the Locale in which to provide the data
      Returns:
      - the specified tournament translated in the provided locale
    • getCompetition

      Competition getCompetition(Urn id)
      Returns a Competition representing the specified competition (the returned data is translated in the configured Locales using the UofConfigurationImpl)
      Parameters:
      id - - an Urn identifier specifying the competition requested
      Returns:
      - a Competition representing the specified competition
    • getCompetition

      Competition getCompetition(Urn id, Locale locale)
      Returns a Competition representing the specified competition (the returned data is translated in the specified Locale)
      Parameters:
      id - - an Urn identifier specifying the competition requested
      locale - - the Locale in which to provide the data
      Returns:
      - a Competition representing the specified competition translated in the provided locale
    • getCompetitor

      Competitor getCompetitor(Urn id)
      Returns a Competitor representing the specified competitor (the returned data is translated in the configured Locales using the UofConfigurationImpl)
      Parameters:
      id - - a unique competitor Urn identifier
      Returns:
      - a Competitor representing the competitor associated with the provided Urn
    • getCompetitor

      Competitor getCompetitor(Urn id, Locale locale)
      Returns a Competitor representing the specified competitor (the returned data is translated in the specified Locale)
      Parameters:
      id - - a unique competitor Urn identifier
      locale - - the Locale in which to provide the data
      Returns:
      - a Competitor representing the competitor associated with the provided Urn
    • getPlayerProfile

      PlayerProfile getPlayerProfile(Urn id)
      Returns a PlayerProfile representing the specified competitor (the returned data is translated in the configured Locales using the UofConfigurationImpl)
      Parameters:
      id - - a unique player Urn identifier
      Returns:
      - a PlayerProfile representing the specified competitor
    • getPlayerProfile

      PlayerProfile getPlayerProfile(Urn id, Locale locale)
      Returns a PlayerProfile representing the specified competitor (the returned data is translated in the specified Locale)
      Parameters:
      id - - a unique player Urn identifier
      locale - - the Locale in which to provide the data
      Returns:
      - a PlayerProfile representing the specified competitor
    • purgeSportEventCacheData

      void purgeSportEventCacheData(Urn eventId)
      Purges the associated sport event cache item
      Parameters:
      eventId - the identifier of the cache item to purge
    • purgeSportEventCacheData

      void purgeSportEventCacheData(Urn eventId, boolean includeStatusPurge)
      Purges the associated sport event cache item
      Parameters:
      eventId - the identifier of the cache item to purge
      includeStatusPurge - an indication if the associated sport event status should be purged too
    • purgeCompetitorProfileCacheData

      void purgeCompetitorProfileCacheData(Urn competitorId)
      Purges the associated competitor cache item
      Parameters:
      competitorId - the identifier of the cache item to purge
    • purgePlayerProfileCacheData

      void purgePlayerProfileCacheData(Urn playerId)
      Purges the associated player profile cache item
      Parameters:
      playerId - the identifier of the cache item to purge
    • getFixtureChanges

      List<FixtureChange> getFixtureChanges()
      Returns the list of all fixtures that have changed in the last 24 hours
      Returns:
      list of FixtureChange
    • getFixtureChanges

      List<FixtureChange> getFixtureChanges(Locale locale)
      Returns the list of all fixtures that have changed in the last 24 hours
      Parameters:
      locale - - the Locale in which to provide the data
      Returns:
      list of FixtureChange
    • getFixtureChanges

      List<FixtureChange> getFixtureChanges(Date after, Urn sportId)
      Returns the list of all fixtures that have changed in the last 24 hours
      Parameters:
      after - specifies the starting date and time for filtering
      sportId - specifies the sport for which the fixtures should be returned
      Returns:
      list of FixtureChange
    • getFixtureChanges

      List<FixtureChange> getFixtureChanges(Date after, Urn sportId, Locale locale)
      Returns the list of all fixtures that have changed in the last 24 hours
      Parameters:
      after - specifies the starting date and time for filtering
      sportId - specifies the sport for which the fixtures should be returned
      locale - - the Locale in which to provide the data
      Returns:
      list of FixtureChange
    • getResultChanges

      List<ResultChange> getResultChanges()
      Returns the list of all fixtures that have changed in the last 24 hours
      Returns:
      list of ResultChange
    • getResultChanges

      List<ResultChange> getResultChanges(Locale locale)
      Returns the list of all fixtures that have changed in the last 24 hours
      Parameters:
      locale - - the Locale in which to provide the data
      Returns:
      list of ResultChange
    • getResultChanges

      List<ResultChange> getResultChanges(Date after, Urn sportId)
      Returns the list of all fixtures that have changed in the last 24 hours
      Parameters:
      after - specifies the starting date and time for filtering
      sportId - specifies the sport for which the fixtures should be returned
      Returns:
      list of ResultChange
    • getResultChanges

      List<ResultChange> getResultChanges(Date after, Urn sportId, Locale locale)
      Returns the list of all fixtures that have changed in the last 24 hours
      Parameters:
      after - specifies the starting date and time for filtering
      sportId - specifies the sport for which the fixtures should be returned
      locale - - the Locale in which to provide the data
      Returns:
      list of ResultChange
    • getListOfSportEvents

      List<Competition> getListOfSportEvents(int startIndex, int limit)
      Lists almost all events we are offering prematch odds for. This endpoint can be used during early startup to obtain almost all fixtures. This endpoint is one of the few that uses pagination.
      Parameters:
      startIndex - starting index (zero based)
      limit - how many records to return (max: 1000)
      Returns:
      a list of sport events
    • getListOfSportEvents

      List<Competition> getListOfSportEvents(int startIndex, int limit, Locale locale)
      Lists almost all events we are offering prematch odds for. This endpoint can be used during early startup to obtain almost all fixtures. This endpoint is one of the few that uses pagination.
      Parameters:
      startIndex - starting index (zero based)
      limit - how many records to return (max: 1000)
      locale - the Locale in which to provide the data
      Returns:
      a list of sport events
    • getAvailableTournaments

      List<SportEvent> getAvailableTournaments(Urn sportId)
      Returns all the available tournaments for a specific sport (the returned data is translated in the default locale configured with the UofConfigurationImpl) (possible types: BasicTournament, Tournament, Stage)
      Parameters:
      sportId - - the specific sport id
      Returns:
      - all available tournaments for a sport we provide coverage for in default locale
    • getAvailableTournaments

      List<SportEvent> getAvailableTournaments(Urn sportId, Locale locale)
      Returns all the available tournaments for a specific sport (the returned data is translated in the specified Locale) (possible types: BasicTournament, Tournament, Stage)
      Parameters:
      sportId - - the specific sport id
      locale - - the Locale in which to provide the data
      Returns:
      - all available tournaments for a sport we provide coverage for in specified locale
    • deleteSportEventsFromCache

      Integer deleteSportEventsFromCache(Date before)
      Deletes the sport events from cache which are scheduled before specified date
      Parameters:
      before - the scheduled Date used to delete sport events from cache
      Returns:
      number of deleted items
    • cacheExport

      List<ExportableCi> cacheExport(EnumSet<CacheType> cacheType)
      Exports current items in the cache
      Parameters:
      cacheType - specifies what type of cache items will be exported
      Returns:
      List of ExportableCi containing all the items currently in the cache
    • cacheImport

      void cacheImport(List<ExportableCi> items)
      Imports provided items into caches
      Parameters:
      items - List of ExportableCi containing the items to be imported
    • getLotteries

      List<Lottery> getLotteries(Locale locale)
      Returns all the available lotteries (the returned data is translated in the specified Locale)
      Parameters:
      locale - - the Locale in which to provide the data
      Returns:
      - all available lotteries in specified locale (from SportsAPI All lotteries endpoint)
    • getPeriodStatuses

      List<PeriodStatus> getPeriodStatuses(Urn id, Locale locale, List<Urn> competitorIds, List<Integer> periods)
      Returns the list of PeriodStatus from the sport event period summary endpoint
      Parameters:
      id - the id of the sport event to be fetched
      locale - the Locale in which to provide the data (can be null)
      competitorIds - the list of competitor ids to fetch the results for (can be null)
      periods - the list of period ids to fetch the results for (can be null)
      Returns:
      the list of PeriodStatus from the sport event period summary endpoint
    • getTimelineEvents

      List<TimelineEvent> getTimelineEvents(Urn id, Locale locale)
      Returns the list of TimelineEvent for the sport event
      Parameters:
      id - the id of the sport event to be fetched
      locale - the Locale in which to provide the data (can be null)
      Returns:
      the list of TimelineEvent for the sport event