Class VehicleStatusServiceImpl

    • Constructor Detail

      • VehicleStatusServiceImpl

        public VehicleStatusServiceImpl()
    • Method Detail

      • search

        public List<VehicleStatus> search​(Map<VehicleSearchParameters,​String> searchParameters,
                                          boolean newSearch)
        Description copied from interface: VehicleStatusService
        Searches vehicles based on the given parameters. Uses vehicle cache for fetching vehicle data. Returns empty results if cache is empty
        Specified by:
        search in interface VehicleStatusService
        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

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

        public void sort​(List<VehicleStatus> vehiclesPerPage,
                         String field,
                         String order)
        Description copied from interface: VehicleStatusService
        Sorts vehicle records on the given field by given order.
        Specified by:
        sort in interface VehicleStatusService
        Parameters:
        vehiclesPerPage - vehicle records to be sorted
        field - field on which the records need to be sorted
        order - order of sorting
      • setConfigurationService

        @Autowired
        public void setConfigurationService​(ConfigurationService configurationService)
        Injects configuration service
        Parameters:
        configurationService - the configurationService to set
      • setRemoteConnectionService

        @Autowired
        public void setRemoteConnectionService​(RemoteConnectionService remoteConnectionService)
        Injects remote connection service
        Parameters:
        remoteConnectionService - the remoteConnectionService to set
      • setVehicleSearchService

        @Autowired
        public void setVehicleSearchService​(VehicleSearchService vehicleSearchService)
        Injects vehicle search service
        Parameters:
        vehicleSearchService - the vehicleSearchService to set