Interface SportEntityFactory

All Known Implementing Classes:
SportEntityFactoryImpl

public interface SportEntityFactory
Defines methods implemented by classes used to build Sport and Tournament instances.
  • Method Details

    • buildSports

      List<Sport> buildSports(List<Locale> locales) throws ObjectNotFoundException
      Builds a List of available Sport instances
      Parameters:
      locales - - a List of locales specifying the languages used in the returned instances
      Returns:
      - a List with the constructed Sport instances
      Throws:
      ObjectNotFoundException - if the sports list failed to build with the selected Locales
    • buildSport

      Sport buildSport(Urn sportId, List<Locale> locales) throws ObjectNotFoundException
      Builds a Sport instance with the provided data
      Parameters:
      sportId - - the Urn sport identifier
      locales - - a List of locales specifying the languages used in the returned instance
      Returns:
      - the constructed Sport instance
      Throws:
      ObjectNotFoundException - if the requested sport failed to build or was not found
    • buildCategory

      CategorySummary buildCategory(Urn id, List<Locale> locales) throws ObjectNotFoundException
      Builds the associated category summary
      Parameters:
      id - the identifier of the category
      locales - locales in which the data is provided
      Returns:
      a CategorySummary associated with the current instance
      Throws:
      ObjectNotFoundException - if the category CI could not be found
    • buildSportForCategory

      SportSummary buildSportForCategory(Urn categoryId, List<Locale> locales) throws ObjectNotFoundException
      Builds the associated category sport summary
      Parameters:
      categoryId - the identifier of the category
      locales - locales in which the data is provided
      Returns:
      a SportSummary associated with the current instance
      Throws:
      ObjectNotFoundException - if the category CI could not be found
    • buildSportEvent

      SportEvent buildSportEvent(Urn id, List<Locale> locales, boolean buildBasicEventImpl) throws ObjectNotFoundException
      Builds the Competition derived class based on the provided data
      Parameters:
      id - - the Urn specifying the identifier of the sport event
      locales - - a List of locales specifying the languages used in the returned instance
      buildBasicEventImpl - - an indication if the basic event entity should be built if the mapping type is unknown
      Returns:
      - the constructed object which is derived from the Competition
      Throws:
      ObjectNotFoundException - if the requested sport event object could not be provided(failure built, api request errors,..)
    • buildSportEvent

      SportEvent buildSportEvent(Urn id, Urn sportId, List<Locale> locales, boolean buildBasicEventImpl) throws ObjectNotFoundException
      Builds the SportEvent derived class based on the provided data
      Parameters:
      id - - the Urn specifying the identifier of the sport event
      sportId - - the Urn specifying the sport type of the event
      locales - - a List of locales specifying the languages used in the returned instance
      buildBasicEventImpl - - an indication if the basic event entity should be built if the mapping type is unknown
      Returns:
      - the constructed object
      Throws:
      ObjectNotFoundException - if the requested sport event object could not be provided(failure built, api request errors,..)
    • buildSportEvents

      List<Competition> buildSportEvents(List<Urn> ids, List<Locale> locales) throws ObjectNotFoundException
      Builds a list of Competition derived classes based on the provided data
      Parameters:
      ids - - the list of Urn specifying the identifier of the sport events to be built
      locales - - a List of locales specifying the languages used in the returned instance
      Returns:
      - the constructed objects
      Throws:
      ObjectNotFoundException - if the requested sport event objects could not be provided(failure built, api request errors,..)
    • buildCompetitor

      Competitor buildCompetitor(Urn id, String qualifier, Integer division, Boolean isVirtual, SportEventCi parentSportEventCi, List<Locale> locales) throws ObjectNotFoundException
      Builds a Competitor instance associated with the provided Urn
      Parameters:
      id - the competitor identifier
      qualifier - the competitor qualifier (if available) *
      division - the competitor division (if available)
      isVirtual - indication if the competitor is marked as virtual
      parentSportEventCi - the parent SportEventCi this Competitor belongs to
      locales - the Locales in which the data should be available
      Returns:
      the constructed object
      Throws:
      ObjectNotFoundException - if the requested instance could not be provided
    • buildStreamCompetitors

      List<Competitor> buildStreamCompetitors(List<Urn> competitorIds, SportEventCi parentSportEventCi, List<Locale> locales)
      Builds a List of Competitor instances Notice: a StreamWrapperException is thrown if any problems are encountered
      Parameters:
      competitorIds - the ids representing the instances that should be built
      parentSportEventCi - the parent SportEventCi this Competitor belongs to
      locales - the Locales in which the data should be available
      Returns:
      the constructed objects
    • buildPlayerProfile

      PlayerProfile buildPlayerProfile(Urn id, List<Locale> locales, List<Urn> possibleAssociatedCompetitorIds) throws ObjectNotFoundException
      Parameters:
      id - the player identifier
      locales - the Locales in which the data should be available
      possibleAssociatedCompetitorIds - a list of possible associated competitor ids (used to prefetch data)
      Returns:
      the constructed object
      Throws:
      ObjectNotFoundException - if the requested instance could not be provided
    • buildCompetitorPlayerProfile

      CompetitorPlayer buildCompetitorPlayerProfile(Urn id, List<Locale> locales, List<Urn> possibleAssociatedCompetitorIds, Map<Urn,Integer> associatedJerseyNumbers) throws ObjectNotFoundException
      Parameters:
      id - the player identifier
      locales - the Locales in which the data should be available
      possibleAssociatedCompetitorIds - a list of possible associated competitor ids (used to prefetch data)
      Returns:
      the constructed object
      Throws:
      ObjectNotFoundException - if the requested instance could not be provided