Class ReceiptsPresenter<T extends ReceiptsView>
- 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<T>
-
- com.cheetahdigital.receipt.ui.list.ReceiptsPresenter<T>
-
- All Implemented Interfaces:
com.cheetahdigital.uikit.architecture.mvp.MvpPresenter<T>
public class ReceiptsPresenter<T extends ReceiptsView> extends com.cheetahdigital.uikit.widget.list.EndlessListPresenter<T>
ExtendsEndlessListPresenter
withReceiptsView
as the View This contains all the calls to the API as well as all the notification to show the contents on the view
-
-
Constructor Summary
Constructors Constructor Description ReceiptsPresenter()
Default constructor that acceptsReceiptParams
needed forReceiptAPI
ReceiptsPresenter(ReceiptParams receiptParams)
Default constructor that acceptsReceiptParams
needed forReceiptAPI
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ReceiptAPI
getReceiptAPI()
Get current instance ofReceiptAPI
protected com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Receipts>,Receipts>
getReceiptsReceivedListener()
Create a listener forReceiptAPI
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 requestvoid
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
-
-
-
-
Constructor Detail
-
ReceiptsPresenter
public ReceiptsPresenter()
Default constructor that acceptsReceiptParams
needed forReceiptAPI
-
ReceiptsPresenter
public ReceiptsPresenter(ReceiptParams receiptParams)
Default constructor that acceptsReceiptParams
needed forReceiptAPI
- Parameters:
receiptParams
- theReceiptParams
needed forReceiptAPI
-
-
Method Detail
-
getReceiptsReceivedListener
protected com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Receipts>,Receipts> getReceiptsReceivedListener()
Create a listener forReceiptAPI
- Returns:
- listener to handle
ReceiptAPI
requests
-
getReceiptAPI
protected ReceiptAPI getReceiptAPI()
Get current instance ofReceiptAPI
- Returns:
ReceiptAPI
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 ReceiptsView>
-
refreshData
public void refreshData()
Description copied from class:com.cheetahdigital.uikit.architecture.refreshable.RefreshablePresenter
Start the refresh view data.- Overrides:
refreshData
in classcom.cheetahdigital.uikit.architecture.refreshable.RefreshablePresenter<T extends ReceiptsView>
-
loadMore
public void loadMore(int currentPage)
- Overrides:
loadMore
in classcom.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 classcom.cheetahdigital.uikit.architecture.refreshable.RefreshablePresenter<T extends ReceiptsView>
- Parameters:
data
- theBaseData
.
-
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 classcom.cheetahdigital.uikit.widget.list.EndlessListPresenter<T extends ReceiptsView>
- Parameters:
data
- instance ofBaseData
passed
-
-