Class ExternalDataServiceImpl

    • Constructor Detail

      • ExternalDataServiceImpl

        public ExternalDataServiceImpl()
    • Method Detail

      • getExternalDataObject

        public Optional<ExternalDataObject> getExternalDataObject​(String source,
                                                                  String id)
        Description copied from interface: ExternalDataService
        This method will return an Optional instance of ExternalDataObject for the given source and identifier It will try to retrieve one through an ExternalDataProvider as defined by the source with the given identifier
        Specified by:
        getExternalDataObject in interface ExternalDataService
        Parameters:
        source - The source in which the lookup will be done
        id - The identifier which will be looked up
        Returns:
        An Optional instance of ExternalDataObject
      • searchExternalDataObjects

        public List<ExternalDataObject> searchExternalDataObjects​(String source,
                                                                  String query,
                                                                  int start,
                                                                  int limit)
        Description copied from interface: ExternalDataService
        This method will return a list of ExternalDataObjects as defined through the source in which they will be searched for, the given query start and limit parameters
        Specified by:
        searchExternalDataObjects in interface ExternalDataService
        Parameters:
        source - The source that defines which ExternalDataProvider is to be used
        query - The query for which the search will be done
        start - The start of the search
        limit - The maximum amount of records to be returned by the search
        Returns:
        A list of ExternalDataObjects that obey the rules in the parameters
      • getExternalDataProvider

        public ExternalDataProvider getExternalDataProvider​(String sourceIdentifier)
        Description copied from interface: ExternalDataService
        This method will return a single ExternalDataProvider which will support the given sourceIdentifier param
        Specified by:
        getExternalDataProvider in interface ExternalDataService
        Parameters:
        sourceIdentifier - The source identifier that the ExternalDataProvider that will be returned by this method has to support
        Returns:
        The ExternalDataProvider that supports the given source identifier
      • getNumberOfResults

        public int getNumberOfResults​(String source,
                                      String query)
        Description copied from interface: ExternalDataService
        This method wil return the total amount of results that will be found for the given query in the given source
        Specified by:
        getNumberOfResults in interface ExternalDataService
        Parameters:
        source - The source in which the query will happen to return the number of results
        query - The query to be ran in this source to retrieve the total amount of results
        Returns:
        The total amount of results that can be returned for this query in the given source