Class EventResponseListPresenter<T extends EventResponseListView>

  • Type Parameters:
    T - the EventResponseListView class
    All Implemented Interfaces:
    com.cheetahdigital.uikit.architecture.mvp.MvpPresenter<T>

    public class EventResponseListPresenter<T extends EventResponseListView>
    extends com.cheetahdigital.uikit.widget.list.EndlessListPresenter<T>
    The EndlessListPresenter class for EventResponseListFragment
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<EventResponses>,​EventResponses> getEventResponsesListener()
      Create a listener for EventsAPI
      protected EventsAPI getEventsAPI()
      Get current instance of EventsAPI
      void loadData()
      Load initial view data.
      void loadMore​(int currentPage)  
      void onLoadMoreFailed​(java.lang.String error)
      End of load more with failed request
      void onLoadMoreSuccess​(com.cheetahdigital.corekit.models.data.BaseData data)
      End of load more with success request
      void onRefreshSuccess​(com.cheetahdigital.corekit.models.data.BaseData data)
      End of refresh with success request.
      void refreshData()
      Start the refresh view data.
      • Methods inherited from class com.cheetahdigital.uikit.widget.list.EndlessListPresenter

        isAppending
      • Methods inherited from class com.cheetahdigital.uikit.architecture.refreshable.RefreshablePresenter

        isRefreshing, onRefreshFailed
      • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getEventResponsesListener

        protected com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<EventResponses>,​EventResponses> getEventResponsesListener()
        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 EventResponseListView>
      • loadMore

        public void loadMore​(int currentPage)
        Overrides:
        loadMore in class com.cheetahdigital.uikit.widget.list.EndlessListPresenter<T extends EventResponseListView>
      • onLoadMoreSuccess

        public void onLoadMoreSuccess​(com.cheetahdigital.corekit.models.data.BaseData data)
        Description copied from class: com.cheetahdigital.uikit.widget.list.EndlessListPresenter
        End of load more with success request
        Overrides:
        onLoadMoreSuccess in class com.cheetahdigital.uikit.widget.list.EndlessListPresenter<T extends EventResponseListView>
        Parameters:
        data - instance of BaseData passed
      • onLoadMoreFailed

        public void onLoadMoreFailed​(java.lang.String error)
        Description copied from class: com.cheetahdigital.uikit.widget.list.EndlessListPresenter
        End of load more with failed request
        Overrides:
        onLoadMoreFailed in class com.cheetahdigital.uikit.widget.list.EndlessListPresenter<T extends EventResponseListView>
        Parameters:
        error - message used for failed cases
      • refreshData

        public void refreshData()
        Description copied from class: com.cheetahdigital.uikit.architecture.refreshable.RefreshablePresenter
        Start the refresh view data.
        Overrides:
        refreshData in class com.cheetahdigital.uikit.architecture.refreshable.RefreshablePresenter<T extends EventResponseListView>
      • onRefreshSuccess

        public void onRefreshSuccess​(com.cheetahdigital.corekit.models.data.BaseData data)
        Description copied from class: com.cheetahdigital.uikit.architecture.refreshable.RefreshablePresenter
        End of refresh with success request.
        Overrides:
        onRefreshSuccess in class com.cheetahdigital.uikit.architecture.refreshable.RefreshablePresenter<T extends EventResponseListView>
        Parameters:
        data - the BaseData.