Interface VehicleStatusService

  • All Known Implementing Classes:
    VehicleStatusServiceImpl

    public interface VehicleStatusService
    Builds vehicle status data by querying TDM and report archiver. Makes web service calls to the exposed APIs on these servers to fetch the required vehicle status data.
    Author:
    abelsare
    • Method Detail

      • getVehicleStatus

        List<VehicleStatus> getVehicleStatus​(boolean loadNew)
        Creates vehicle status data by making web service calls to TDM and report archive servers
        Parameters:
        indicates - whether new data should be loaded. The service returns cached data otherwise
        Returns:
        new/cached vehicle status data
      • search

        List<VehicleStatus> search​(Map<VehicleSearchParameters,​String> searchParameters,
                                   boolean newSearch)
        Searches vehicles based on the given parameters. Uses vehicle cache for fetching vehicle data. Returns empty results if cache is empty
        Parameters:
        searchParameters - paramters for searching
        newSearch - indicates this is a new search
        Returns:
        results matching the parameters, empty list if the cache is empty
      • getVehicleStatistics

        VehicleStatistics getVehicleStatistics​(String... parameters)
        Returns statistics of the vehicles tracked such as vehicles reporting emergency, vehicles in revenue servie, vehicles tracked in past five minutes
        Parameters:
        parameters - optional parameters from client
        Returns:
        vehicle statistics with the required count
      • getVehicleDetail

        VehicleDetail getVehicleDetail​(String vehicleId)
        Make a web service call to report archive server about a specific vehicle.
        Parameters:
        vehicleId -
        Returns:
      • sort

        void sort​(List<VehicleStatus> vehiclesPerPage,
                  String field,
                  String order)
        Sorts vehicle records on the given field by given order.
        Parameters:
        vehiclesPerPage - vehicle records to be sorted
        field - field on which the records need to be sorted
        order - order of sorting