Class ReceiptsPresenter<T extends ReceiptsView>

  • All Implemented Interfaces:
    com.cheetahdigital.uikit.architecture.mvp.MvpPresenter<T>

    public class ReceiptsPresenter<T extends ReceiptsView>
    extends com.cheetahdigital.uikit.widget.list.EndlessListPresenter<T>
    Extends EndlessListPresenter with ReceiptsView as the View This contains all the calls to the API as well as all the notification to show the contents on the view
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected ReceiptAPI getReceiptAPI()
      Get current instance of ReceiptAPI
      protected com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Receipts>,​Receipts> getReceiptsReceivedListener()
      Create a listener for ReceiptAPI
      void loadData()
      Load initial view data.
      void loadMore​(int currentPage)  
      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, onLoadMoreFailed
      • 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

      • getReceiptsReceivedListener

        protected com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Receipts>,​Receipts> getReceiptsReceivedListener()
        Create a listener for ReceiptAPI
        Returns:
        listener to handle ReceiptAPI 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 ReceiptsView>
      • 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 ReceiptsView>
      • loadMore

        public void loadMore​(int currentPage)
        Overrides:
        loadMore in class com.cheetahdigital.uikit.widget.list.EndlessListPresenter<T extends ReceiptsView>
      • 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 ReceiptsView>
        Parameters:
        data - the BaseData.
      • 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 ReceiptsView>
        Parameters:
        data - instance of BaseData passed