Class PlaceDetailsPresenter<T extends PlaceDetailsView>
- java.lang.Object
-
- com.cheetahdigital.uikit.architecture.mvp.MvpNullObjectBasePresenter<V>
-
- com.cheetahdigital.uikit.architecture.mvp.Presenter<V>
-
- com.cheetahdigital.uikit.architecture.lce.LcePresenter<T>
-
- com.cheetahdigital.locations.ui.places.details.PlaceDetailsPresenter<T>
-
- Type Parameters:
T- theMvpViewclass
- All Implemented Interfaces:
MvpPresenter<T>
public class PlaceDetailsPresenter<T extends PlaceDetailsView> extends LcePresenter<T>
TheMvpPresenterclass forPlaceDetailsActivity
-
-
Constructor Summary
Constructors Constructor Description PlaceDetailsPresenter(java.lang.String id)Constructor of this presenter.PlaceDetailsPresenter(java.lang.String id, PlacesParams placesParams)Constructor of this presenter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ListenerModel<BaseModel<Place>,Place>getPlaceReceivedListener()Create a listener forPlacesAPIprotected PlacesAPIgetPlacesAPI()Get current instance ofPlacesAPIvoidloadData()Load initial view data.protected voidonPlaceReceivedFailed(java.lang.String error)Called after a failed api call fromPlacesAPI.getPlace(PlacesParams, boolean, ListenerModel)protected voidonPlaceReceivedSuccess(Place data)Called after a success api call fromPlacesAPI.getPlace(PlacesParams, boolean, ListenerModel)-
Methods inherited from class com.cheetahdigital.uikit.architecture.lce.LcePresenter
onLoadFailed, onLoadSuccess
-
Methods inherited from class com.cheetahdigital.uikit.architecture.mvp.MvpNullObjectBasePresenter
attachView, detachView, getView
-
-
-
-
Constructor Detail
-
PlaceDetailsPresenter
public PlaceDetailsPresenter(java.lang.String id)
Constructor of this presenter. Creates the defaultPlacesParamsforloadData().- Parameters:
id- id of the place
-
PlaceDetailsPresenter
public PlaceDetailsPresenter(java.lang.String id, PlacesParams placesParams)Constructor of this presenter- Parameters:
id- id of the placeplacesParams- customPlacesParams
-
-
Method Detail
-
getPlaceReceivedListener
protected ListenerModel<BaseModel<Place>,Place> getPlaceReceivedListener()
Create a listener forPlacesAPI- Returns:
- listener to handle
PlacesAPIrequests
-
getPlacesAPI
protected PlacesAPI getPlacesAPI()
Get current instance ofPlacesAPI- Returns:
PlacesAPIused on this presenter
-
loadData
public void loadData()
Description copied from class:LcePresenterLoad initial view data.- Specified by:
loadDatain classLcePresenter<T extends PlaceDetailsView>
-
onPlaceReceivedFailed
protected void onPlaceReceivedFailed(java.lang.String error)
Called after a failed api call fromPlacesAPI.getPlace(PlacesParams, boolean, ListenerModel)- Parameters:
error- message of the error
-
onPlaceReceivedSuccess
protected void onPlaceReceivedSuccess(Place data)
Called after a success api call fromPlacesAPI.getPlace(PlacesParams, boolean, ListenerModel)- Parameters:
data-Placereceived
-
-