Class EventDateDetailsPresenter<T extends EventDateDetailsView>

  • Type Parameters:
    T - the EventDateDetailsView 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>
    The LcePresenter class for EventDateDetailsActivity
    • Constructor Detail

      • EventDateDetailsPresenter

        public EventDateDetailsPresenter​(java.lang.String eventId)
        Parameters:
        eventId - id of the event
    • Method Detail

      • getEventsListener

        protected com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Event>,​Event> getEventsListener()
        Create a listener for EventsAPI
        Returns:
        listener to handle EventsAPI requests
      • getEventFavoriteListener

        protected com.cheetahdigital.corekit.models.module.Listener<com.cheetahdigital.corekit.models.responses.SuccessResponse> getEventFavoriteListener()
        Create a listener for EventsAPI
        Returns:
        listener to handle EventsAPI requests
      • loadData

        public void loadData()
        Description copied from class: com.cheetahdigital.uikit.architecture.lce.LcePresenter
        Load initial view data.
        Specified by:
        loadData in class com.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 in Event
      • 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, else false
      • onEventFavorited

        public void onEventFavorited​(boolean favorited,
                                     EventsParams eventsParams)
        Set an Event as favorite/unfavorite
        Parameters:
        favorited - true to set as favorite, else false
        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 class com.cheetahdigital.uikit.architecture.lce.LcePresenter<T extends EventDateDetailsView>
        Parameters:
        data - instance of BaseData processed