Class EventDateDetailsPresenter<T extends EventDateDetailsView>
- 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.event.ui.eventdate.detail.EventDateDetailsPresenter<T>
-
- Type Parameters:
T- theEventDateDetailsViewclass
- All Implemented Interfaces:
MvpPresenter<T>
public class EventDateDetailsPresenter<T extends EventDateDetailsView> extends LcePresenter<T>
TheLcePresenterclass forEventDateDetailsActivity
-
-
Constructor Summary
Constructors Constructor Description EventDateDetailsPresenter(java.lang.String eventId)Constructor forEventDateDetailsPresenterEventDateDetailsPresenter(java.lang.String eventId, EventsParams eventsParams)Constructor forEventDateDetailsPresenter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Listener<SuccessResponse>getEventFavoriteListener()Create a listener forEventsAPIprotected EventsAPIgetEventsAPI()Get current instance ofEventsAPIprotected ListenerModel<BaseModel<Event>,Event>getEventsListener()Create a listener forEventsAPIvoidloadData()Load initial view data.protected voidonEventDownloadFailed(java.lang.String error)Called after a failed event requestprotected voidonEventDownloadSuccess(Event data)Called after a successful event requestvoidonEventFavorited(boolean favorited)Set an Event as favorite/unfavoritevoidonEventFavorited(boolean favorited, EventsParams eventsParams)Set an Event as favorite/unfavoriteprotected voidonEventFavoritedFailed(java.lang.String error)Called after a failed favorite requestprotected voidonEventFavoritedSuccess(SuccessResponse data)Called after a successful favorite requestvoidonLoadSuccess(BaseData data)Show content view-
Methods inherited from class com.cheetahdigital.uikit.architecture.lce.LcePresenter
onLoadFailed
-
Methods inherited from class com.cheetahdigital.uikit.architecture.mvp.MvpNullObjectBasePresenter
attachView, detachView, getView
-
-
-
-
Constructor Detail
-
EventDateDetailsPresenter
public EventDateDetailsPresenter(java.lang.String eventId)
Constructor forEventDateDetailsPresenter- Parameters:
eventId- id of the event
-
EventDateDetailsPresenter
public EventDateDetailsPresenter(java.lang.String eventId, EventsParams eventsParams)Constructor forEventDateDetailsPresenter- Parameters:
eventId- id of the eventeventsParams- theEventsParams
-
-
Method Detail
-
getEventsListener
protected ListenerModel<BaseModel<Event>,Event> getEventsListener()
Create a listener forEventsAPI- Returns:
- listener to handle
EventsAPIrequests
-
getEventFavoriteListener
protected Listener<SuccessResponse> getEventFavoriteListener()
Create a listener forEventsAPI- Returns:
- listener to handle
EventsAPIrequests
-
getEventsAPI
protected EventsAPI getEventsAPI()
Get current instance ofEventsAPI- Returns:
EventsAPIused on this presenter
-
loadData
public void loadData()
Description copied from class:LcePresenterLoad initial view data.- Specified by:
loadDatain classLcePresenter<T extends EventDateDetailsView>
-
onEventDownloadSuccess
protected void onEventDownloadSuccess(Event data)
Called after a successful event request- Parameters:
data- received response parse inEvent
-
onEventDownloadFailed
protected void onEventDownloadFailed(java.lang.String error)
Called after a failed event request- Parameters:
error- detail of the error
-
onEventFavorited
public void onEventFavorited(boolean favorited)
Set an Event as favorite/unfavorite- Parameters:
favorited-trueto set as favorite, elsefalse
-
onEventFavorited
public void onEventFavorited(boolean favorited, EventsParams eventsParams)Set an Event as favorite/unfavorite- Parameters:
favorited-trueto set as favorite, elsefalseeventsParams-EventsParamsto use for responding
-
onEventFavoritedSuccess
protected void onEventFavoritedSuccess(SuccessResponse data)
Called after a successful favorite request- Parameters:
data- response received
-
onEventFavoritedFailed
protected void onEventFavoritedFailed(java.lang.String error)
Called after a failed favorite request- Parameters:
error- message of the error
-
onLoadSuccess
public void onLoadSuccess(BaseData data)
Description copied from class:LcePresenterShow content view- Overrides:
onLoadSuccessin classLcePresenter<T extends EventDateDetailsView>- Parameters:
data- instance ofBaseDataprocessed
-
-