java.lang.Object
   ↳ AndroidViewModel
     ↳ com.mapsted.ui.base.BaseViewModel
       ↳ com.mapsted.ui.map.CommonViewModel
         ↳ com.mapsted.ui.map.MapViewModel

Summary

Nested Classes
class MapViewModel.RouteRequestError  
Public Methods
void addTagToItinerary(Tag tag)
void createCustomTag(TagInfo tagInfo, MercatorZone mercatorZone, Consumer<Tag> resultCallback)
This method use only for client side requirement for tag creation
static ViewModelProvider.Factory createProvider(Application application, MapUiApi mapUiApi)
void createTag(Tag tag)
void deleteCustomTag(int tagId, Consumer<Tag> resultCallback)
void deleteCustomTags(ArrayList<Integer> tagIds, Consumer<Boolean> resultCallback)
void deleteTag(Tag tag)
void detachMapFragment()
static List<ISearchable> extractRoutingParams(CoreApi coreApi, int propertyId, List<DeeplinkData.Destination> destinationList)
getActiveAlertsIdsList()
getAreAlertsAvailable()
getCustomTagDisplay()
getCustomTagEvent()
void getEstimation(SearchResult searchResult)
getIsUserPositionAvailable()
getItineraryMessageToShow()
Itinerary manager handles the messages to show to the user.
getLastRoutingResponseLiveData()
getMultiLocationLiveData()
SingleLiveEvent<Boolean> getNavigateToEntityDetails()
getRecentSearchItemsLiveData()
getRoutePreviewSelectedRouteLiveData()
getRoutePreviewSelectedRouteSegmentLiveData()
getRoutingRequestErrorEvent()
String getRoutingStartMsg()
Entity getSelectedEntity()
BuildingData getSelectedLocationBuildingData()
String getSelectedLocationBuildingName()
Tag getSelectedTag()
getShowArbitraryLocationLiveData()
getShowAssistedPositioningBtn()
getShowChooseDestinationSearchDialogLiveData()
getShowCreateTagLiveData()
getShowEditTagLiveData()
getShowItineraryLiveData()
getShowMapOverlayItemDetailLiveData()
getShowNavigationViewLiveData()
getShowProgressBarEventLiveData()
getShowRouteOptionsLiveData()
getShowRoutePreviewGoBtnLiveData()
getShowRoutePreviewLiveData()
getShowRoutingStepsLiveData()
getShowSelectedEntityDetailLiveData()
getShowSelectedTagLiveData()
getShowTagDetailLiveData()
getShowTagOptionLiveData()
getShowTagsLiveData()
getTags()
getTagsListLiveData()
getTagsMapPinsVisibilityLiveData()
getZoneChangeConfirmationLiveData()
getZoneLiveData()
String getmSearchQueryText()
void handleMapClickEvents(MapClickEvent event)
void hideProgressBar()
void init()
synchronized boolean isBottomSheetLoadingInProgress()
boolean isSelectedEntityNameAvailable()
boolean isTagNameExist(String tagName, Consumer<Boolean> result)
void loadTags(int propertyId)
void moveItineraryStop(int fromPosition, int toPosition)
Method to move change elements from the itinerary list specifying from and to positions.
void onAddToItineraryClicked(ItineraryItem itineraryItem)
void onDestinationReached(Waypoint destination)
void onErrorMessage(String msg)
void onMapSearchResultSelected(SearchResult searchResult)
Navigate map to entity id location within the map
void onMyLocationSelected(int selectedADestinationIndex)
void onNewDestinationSelected(ItineraryItem itineraryItem, int index)
void onRouteOptionsButtonClicked()
Method to handle a click event on Route Options button.
void onRoutePreviewDismissed()
Clean-up route preview states
void onSearchResultSelected(SearchResult searchResult)
Navigate map to entity id location from the outside the map
void onSwapItineraryItemsClicked()
Method that that swaps destinations when only two are on list.
void onTagClicked()
void onViewStepsClicked(int routeIdx)
void postCustomTagEvent()
void postShowRoutePreview(RoutingResponse routingResponse)
void processItineraryNavigationRequest()
void processMapstedMapNotification(MapstedMapNotification.Type type, Object payload)
void removeItineraryItem(ItineraryItem itineraryItem)
Method to remove elements from the itinerary list specifying the position.
void removeItineraryItemByIdx(int idx)
Method to remove elements by swiping them from the itinerary list specifying the position.
void requestAllCustomsTags(Consumer<List<Tag>> resultCallback)
void requestRouting(List<ItineraryItem> itineraryItems, Consumer<Void> onComplete)
void resetLastRoutingResponseLiveData()
void resetMultiLocationLiveData()
synchronized void selectBuilding(int propertyId, int buildingId)
void selectEntity(Entity entity)
void selectEntity(EntityZone entityZone)
void selectMapOverlayItemDetail(MapOverlayItem mapOverlayItem)
synchronized void selectSearchEntityById(String searchEntityId)
void selectedFloor(int buildingId, int floorId)
void setLastRoutingResponseLiveData(RoutingResponse routeResponse)
void setRecentSearchItemsLiveData(List<SearchResultItem> recentList)
void setRoutePreviewState(Route route, int routeIdx, int segmentIdx)
void setSelectedLocationBuildingData(int buildingId)
void setStartTagToItinerary(Tag tag)
void setTagsMapPinsVisibilityLiveData(Boolean show)
void showAllCustomTagsOnMap(boolean show)
void showArbitraryLocationLiveData(ArbitraryLocation arbitraryLocation)
void showChooseDestinationSearchDialogFragment(ItineraryItem itemToReplace, int positionToReplace)
void showCreateTag()
void showDeeplinkMap()
void showEditTag(Tag tag)
void showItinerary()
void showMyTags()
void showNavigationView()
void showProgressBar()
void showTagDetail(Tag tag)
void showTagDetail(int tagId)
void updateCustomTag(TagInfo tagInfo, Consumer<Tag> resultCallback)
This method use only for client side requirement for update tag info
boolean updateMapStatusEntityNearest(Entity entity)
void updateMapStatusEntitySpecific(Entity entity)
void updateMapTagSetting(boolean b)
void updateTag(Tag tag)
[Expand]
Inherited Methods
From class com.mapsted.ui.map.CommonViewModel
From class com.mapsted.ui.base.BaseViewModel
From class java.lang.Object
From interface com.mapsted.ui.MapUiApi.Itinerary.ErrorMessageListener
From interface com.mapsted.ui.map.interfaces.IItineraryUserActions
From interface com.mapsted.ui.map.interfaces.ISelectedEntityUserActions

Public Methods

public void addTagToItinerary (Tag tag)

public void createCustomTag (TagInfo tagInfo, MercatorZone mercatorZone, Consumer<Tag> resultCallback)

This method use only for client side requirement for tag creation

public static ViewModelProvider.Factory createProvider (Application application, MapUiApi mapUiApi)

public void createTag (Tag tag)

public void deleteCustomTag (int tagId, Consumer<Tag> resultCallback)

public void deleteCustomTags (ArrayList<Integer> tagIds, Consumer<Boolean> resultCallback)

public void deleteTag (Tag tag)

public void detachMapFragment ()

public static List<ISearchable> extractRoutingParams (CoreApi coreApi, int propertyId, List<DeeplinkData.Destination> destinationList)

public getActiveAlertsIdsList ()

public getAreAlertsAvailable ()

public getCustomTagDisplay ()

public getCustomTagEvent ()

public void getEstimation (SearchResult searchResult)

public getIsUserPositionAvailable ()

public getItineraryMessageToShow ()

Itinerary manager handles the messages to show to the user. The observer of this field will get and send the message to the proper method to show it to the user.

Returns
  • LiveData

public getLastRoutingResponseLiveData ()

public getMultiLocationLiveData ()

public SingleLiveEvent<Boolean> getNavigateToEntityDetails ()

public getRecentSearchItemsLiveData ()

public getRoutePreviewSelectedRouteLiveData ()

public getRoutePreviewSelectedRouteSegmentLiveData ()

public getRoutingRequestErrorEvent ()

public String getRoutingStartMsg ()

public Entity getSelectedEntity ()

public BuildingData getSelectedLocationBuildingData ()

public String getSelectedLocationBuildingName ()

public Tag getSelectedTag ()

public getShowArbitraryLocationLiveData ()

public getShowAssistedPositioningBtn ()

public getShowChooseDestinationSearchDialogLiveData ()

public getShowCreateTagLiveData ()

public getShowEditTagLiveData ()

public getShowItineraryLiveData ()

public getShowMapOverlayItemDetailLiveData ()

public getShowNavigationViewLiveData ()

public getShowProgressBarEventLiveData ()

public getShowRouteOptionsLiveData ()

public getShowRoutePreviewGoBtnLiveData ()

public getShowRoutePreviewLiveData ()

public getShowRoutingStepsLiveData ()

public getShowSelectedEntityDetailLiveData ()

public getShowSelectedTagLiveData ()

public getShowTagDetailLiveData ()

public getShowTagOptionLiveData ()

public getShowTagsLiveData ()

public getTags ()

public getTagsListLiveData ()

public getTagsMapPinsVisibilityLiveData ()

public getZoneChangeConfirmationLiveData ()

public getZoneLiveData ()

public String getmSearchQueryText ()

public void handleMapClickEvents (MapClickEvent event)

public void hideProgressBar ()

public void init ()

public synchronized boolean isBottomSheetLoadingInProgress ()

public boolean isSelectedEntityNameAvailable ()

public boolean isTagNameExist (String tagName, Consumer<Boolean> result)

public void loadTags (int propertyId)

public void moveItineraryStop (int fromPosition, int toPosition)

Method to move change elements from the itinerary list specifying from and to positions. After doing the pertinent data processing will send a notification to observers to update the UI.

Parameters
fromPosition Original position
toPosition Destination position where will be moved

public void onAddToItineraryClicked (ItineraryItem itineraryItem)

public void onDestinationReached (Waypoint destination)

public void onErrorMessage (String msg)

public void onMapSearchResultSelected (SearchResult searchResult)

Navigate map to entity id location within the map

public void onMyLocationSelected (int selectedADestinationIndex)

public void onNewDestinationSelected (ItineraryItem itineraryItem, int index)

public void onRouteOptionsButtonClicked ()

Method to handle a click event on Route Options button.

public void onRoutePreviewDismissed ()

Clean-up route preview states

public void onSearchResultSelected (SearchResult searchResult)

Navigate map to entity id location from the outside the map

public void onSwapItineraryItemsClicked ()

Method that that swaps destinations when only two are on list.

public void onTagClicked ()

public void onViewStepsClicked (int routeIdx)

public void postCustomTagEvent ()

public void postShowRoutePreview (RoutingResponse routingResponse)

public void processItineraryNavigationRequest ()

public void processMapstedMapNotification (MapstedMapNotification.Type type, Object payload)

public void removeItineraryItem (ItineraryItem itineraryItem)

Method to remove elements from the itinerary list specifying the position. After doing the pertinent data processing will send a notification to observers to update the UI.

Parameters
itineraryItem FeedItem to remove from itinerary list

public void removeItineraryItemByIdx (int idx)

Method to remove elements by swiping them from the itinerary list specifying the position. After doing the pertinent data processing will send a notification to observers to update the UI.

Parameters
idx Index of the item to be removed

public void requestAllCustomsTags (Consumer<List<Tag>> resultCallback)

public void requestRouting (List<ItineraryItem> itineraryItems, Consumer<Void> onComplete)

public void resetLastRoutingResponseLiveData ()

public void resetMultiLocationLiveData ()

public synchronized void selectBuilding (int propertyId, int buildingId)

public void selectEntity (Entity entity)

public void selectEntity (EntityZone entityZone)

public void selectMapOverlayItemDetail (MapOverlayItem mapOverlayItem)

public synchronized void selectSearchEntityById (String searchEntityId)

public void selectedFloor (int buildingId, int floorId)

public void setLastRoutingResponseLiveData (RoutingResponse routeResponse)

public void setRecentSearchItemsLiveData (List<SearchResultItem> recentList)

public void setRoutePreviewState (Route route, int routeIdx, int segmentIdx)

public void setSelectedLocationBuildingData (int buildingId)

public void setStartTagToItinerary (Tag tag)

public void setTagsMapPinsVisibilityLiveData (Boolean show)

public void showAllCustomTagsOnMap (boolean show)

public void showArbitraryLocationLiveData (ArbitraryLocation arbitraryLocation)

public void showChooseDestinationSearchDialogFragment (ItineraryItem itemToReplace, int positionToReplace)

Parameters
itemToReplace if new item is being added, set to null. Otherwise set the old item here.
positionToReplace position to be replaced or added.

public void showCreateTag ()

public void showDeeplinkMap ()

public void showEditTag (Tag tag)

public void showItinerary ()

public void showMyTags ()

public void showNavigationView ()

public void showProgressBar ()

public void showTagDetail (Tag tag)

public void showTagDetail (int tagId)

public void updateCustomTag (TagInfo tagInfo, Consumer<Tag> resultCallback)

This method use only for client side requirement for update tag info

public boolean updateMapStatusEntityNearest (Entity entity)

public void updateMapStatusEntitySpecific (Entity entity)

public void updateMapTagSetting (boolean b)

public void updateTag (Tag tag)