Class GiftcardHistoryPresenter<V extends GiftcardHistoryView>
- java.lang.Object
-
- com.cheetahdigital.uikit.architecture.mvp.MvpNullObjectBasePresenter<V>
-
- com.cheetahdigital.uikit.architecture.mvp.Presenter<V>
-
- com.cheetahdigital.uikit.architecture.lce.LcePresenter<V>
-
- com.cheetahdigital.uikit.architecture.refreshable.RefreshablePresenter<V>
-
- com.cheetahdigital.uikit.widget.list.ListPresenter<V>
-
- com.cheetahdigital.uikit.widget.list.EndlessListPresenter<V>
-
- com.cheetahdigital.giftcards.ui.history.GiftcardHistoryPresenter<V>
-
- Type Parameters:
V- an interface that extends theGiftcardHistoryView
- All Implemented Interfaces:
MvpPresenter<V>
public class GiftcardHistoryPresenter<V extends GiftcardHistoryView> extends EndlessListPresenter<V>
This presenter class contains the API calls for getting the gift card transactions using the Gift Card module. This is a child class ofEndlessListPresenterwhich is bound to theGiftcardHistoryView, which means that this will be used to display theTransactionsobject to a view of typeGiftcardHistoryView
-
-
Constructor Summary
Constructors Constructor Description GiftcardHistoryPresenter(java.lang.String cardNumber)Constructor of this presenterGiftcardHistoryPresenter(java.lang.String cardNumber, GiftcardParams queryParams)Constructor of this presenter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected GiftcardsAPIgetGiftcardsAPI()Get current instance ofGiftcardsAPIprotected ListenerModel<BaseModel<Transactions>,Transactions>getTransactionsReceivedListener()Create a listener forGiftcardsAPIvoidloadData()Load initial view data.voidloadMore(int currentPage)voidonLoadMoreSuccess(BaseData data)End of load more with success requestvoidonRefreshSuccess(BaseData data)End of refresh with success request.voidrefreshData()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
-
-
-
-
Constructor Detail
-
GiftcardHistoryPresenter
public GiftcardHistoryPresenter(java.lang.String cardNumber)
Constructor of this presenter- Parameters:
cardNumber- code of gift card
-
GiftcardHistoryPresenter
public GiftcardHistoryPresenter(java.lang.String cardNumber, GiftcardParams queryParams)Constructor of this presenter- Parameters:
cardNumber- code of gift cardqueryParams- customGiftcardParamsfor transactions API call inloadData()
-
-
Method Detail
-
getTransactionsReceivedListener
protected ListenerModel<BaseModel<Transactions>,Transactions> getTransactionsReceivedListener()
Create a listener forGiftcardsAPI- Returns:
- listener to handle
GiftcardsAPIrequests
-
getGiftcardsAPI
protected GiftcardsAPI getGiftcardsAPI()
Get current instance ofGiftcardsAPI- Returns:
GiftcardsAPIused on this presenter
-
loadData
public void loadData()
Description copied from class:LcePresenterLoad initial view data.- Specified by:
loadDatain classLcePresenter<V extends GiftcardHistoryView>
-
refreshData
public void refreshData()
Description copied from class:RefreshablePresenterStart the refresh view data.- Overrides:
refreshDatain classRefreshablePresenter<V extends GiftcardHistoryView>
-
loadMore
public void loadMore(int currentPage)
- Overrides:
loadMorein classEndlessListPresenter<V extends GiftcardHistoryView>
-
onRefreshSuccess
public void onRefreshSuccess(BaseData data)
Description copied from class:RefreshablePresenterEnd of refresh with success request.- Overrides:
onRefreshSuccessin classRefreshablePresenter<V extends GiftcardHistoryView>- Parameters:
data- theBaseData.
-
onLoadMoreSuccess
public void onLoadMoreSuccess(BaseData data)
Description copied from class:EndlessListPresenterEnd of load more with success request- Overrides:
onLoadMoreSuccessin classEndlessListPresenter<V extends GiftcardHistoryView>- Parameters:
data- instance ofBaseDatapassed
-
-