Interface VehiclesManager


public interface VehiclesManager
Vehicles manager
Since:
1.0
  • Method Details

    • getVehicles

      @NonNull List<VehicleParams> getVehicles(@Nullable Vehicle.VehicleType type)
      Get all defined vehicles of given type
      Parameters:
      type - type of vehicle ('null' for all vehicle types)
      Returns:
      list of all defined vehicles of requested type
      Since:
      1.0
    • getActiveVehicleProfile

      @Nullable VehicleParams getActiveVehicleProfile()
      Get active vehicle profile
      Returns:
      current vehicle profile
      Since:
      1.0
    • setActiveVehicleProfile

      @NonNull VehiclesManager.SetActiveVehicleProfileResult setActiveVehicleProfile(@NonNull String vehicleId)
      Set active vehicle profile identified by vehicle ID
      Parameters:
      vehicleId - existing vehicle ID
      Returns:
      success or reason of failure
      Since:
      1.0
    • createNewVehicle

      @Nullable VehicleParams createNewVehicle(@NonNull Vehicle.VehicleType vehicleType, @NonNull String vehicleName, boolean setAsActive)
      Create new vehicle with default parameters of given vehicle type
      Parameters:
      vehicleType - vehicle type to create
      vehicleName - vehicle name to create
      setAsActive - true to set newly created profile as the active one
      Returns:
      VehicleParams class instance or null if a vehicle with the same name already exists
      Since:
      4.3
    • deleteExistingVehicle

      boolean deleteExistingVehicle(@NonNull String vehicleId)
      Delete existing vehicle
      Parameters:
      vehicleId - vehicle Id to delete
      Returns:
      true on success, false when a vehicle with such Id does not exist
      Since:
      4.3