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
- theEventDateDetailsView
class
- All Implemented Interfaces:
com.cheetahdigital.uikit.architecture.mvp.MvpPresenter<T>
public class EventDateDetailsPresenter<T extends EventDateDetailsView> extends com.cheetahdigital.uikit.architecture.lce.LcePresenter<T>
TheLcePresenter
class forEventDateDetailsActivity
-
-
Constructor Summary
Constructors Constructor Description EventDateDetailsPresenter(java.lang.String eventId)
Constructor forEventDateDetailsPresenter
EventDateDetailsPresenter(java.lang.String eventId, EventsParams eventsParams)
Constructor forEventDateDetailsPresenter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.cheetahdigital.corekit.models.module.Listener<com.cheetahdigital.corekit.models.responses.SuccessResponse>
getEventFavoriteListener()
Create a listener forEventsAPI
protected EventsAPI
getEventsAPI()
Get current instance ofEventsAPI
protected com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Event>,Event>
getEventsListener()
Create a listener forEventsAPI
void
loadData()
Load initial view data.protected void
onEventDownloadFailed(java.lang.String error)
Called after a failed event requestprotected void
onEventDownloadSuccess(Event data)
Called after a successful event requestvoid
onEventFavorited(boolean favorited)
Set an Event as favorite/unfavoritevoid
onEventFavorited(boolean favorited, EventsParams eventsParams)
Set an Event as favorite/unfavoriteprotected void
onEventFavoritedFailed(java.lang.String error)
Called after a failed favorite requestprotected void
onEventFavoritedSuccess(com.cheetahdigital.corekit.models.responses.SuccessResponse data)
Called after a successful favorite requestvoid
onLoadSuccess(com.cheetahdigital.corekit.models.data.BaseData data)
Show content view
-
-
-
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 com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Event>,Event> getEventsListener()
Create a listener forEventsAPI
- Returns:
- listener to handle
EventsAPI
requests
-
getEventFavoriteListener
protected com.cheetahdigital.corekit.models.module.Listener<com.cheetahdigital.corekit.models.responses.SuccessResponse> getEventFavoriteListener()
Create a listener forEventsAPI
- Returns:
- listener to handle
EventsAPI
requests
-
getEventsAPI
protected EventsAPI getEventsAPI()
Get current instance ofEventsAPI
- Returns:
EventsAPI
used on this presenter
-
loadData
public void loadData()
Description copied from class:com.cheetahdigital.uikit.architecture.lce.LcePresenter
Load initial view data.- Specified by:
loadData
in classcom.cheetahdigital.uikit.architecture.lce.LcePresenter<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
-true
to set as favorite, elsefalse
-
onEventFavorited
public void onEventFavorited(boolean favorited, EventsParams eventsParams)
Set an Event as favorite/unfavorite- Parameters:
favorited
-true
to set as favorite, elsefalse
eventsParams
-EventsParams
to use for responding
-
onEventFavoritedSuccess
protected void onEventFavoritedSuccess(com.cheetahdigital.corekit.models.responses.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(com.cheetahdigital.corekit.models.data.BaseData data)
Description copied from class:com.cheetahdigital.uikit.architecture.lce.LcePresenter
Show content view- Overrides:
onLoadSuccess
in classcom.cheetahdigital.uikit.architecture.lce.LcePresenter<T extends EventDateDetailsView>
- Parameters:
data
- instance ofBaseData
processed
-
-