Class ReceiptDetailsPresenter<T extends ReceiptDetailsView>
- java.lang.Object
-
- com.cheetahdigital.uikit.architecture.mvp.MvpNullObjectBasePresenter<V>
-
- com.cheetahdigital.uikit.architecture.mvp.Presenter<V>
-
- com.cheetahdigital.uikit.architecture.lce.LcePresenter<T>
-
- com.cheetahdigital.receipt.ui.detail.ReceiptDetailsPresenter<T>
-
- All Implemented Interfaces:
com.cheetahdigital.uikit.architecture.mvp.MvpPresenter<T>
public class ReceiptDetailsPresenter<T extends ReceiptDetailsView> extends com.cheetahdigital.uikit.architecture.lce.LcePresenter<T>
-
-
Constructor Summary
Constructors Constructor Description ReceiptDetailsPresenter(java.lang.String receiptId)
Default constructor that acceptsReceiptParams
needed forReceiptAPI
ReceiptDetailsPresenter(java.lang.String receiptId, 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<Receipt>,Receipt>
getReceiptDetailReceivedListener()
Create a listener forReceiptAPI
void
loadData()
Load initial view data.protected void
onReceiptDetailReceivedFailed(java.lang.String error)
Called after a failed response fromReceiptAPI.getReceipt(ReceiptParams, boolean, ListenerModel)
protected void
onReceiptDetailReceivedSuccess(Receipt data)
Called after a successful response fromReceiptAPI.getReceipt(ReceiptParams, boolean, ListenerModel)
-
Methods inherited from class com.cheetahdigital.uikit.architecture.lce.LcePresenter
onLoadFailed, onLoadSuccess
-
-
-
-
Constructor Detail
-
ReceiptDetailsPresenter
public ReceiptDetailsPresenter(java.lang.String receiptId)
Default constructor that acceptsReceiptParams
needed forReceiptAPI
- Parameters:
receiptId
- id of the receipt details
-
ReceiptDetailsPresenter
public ReceiptDetailsPresenter(java.lang.String receiptId, ReceiptParams receiptParams)
Default constructor that acceptsReceiptParams
needed forReceiptAPI
- Parameters:
receiptId
- id of the receipt detailsreceiptParams
- theReceiptParams
needed forReceiptAPI
-
-
Method Detail
-
getReceiptDetailReceivedListener
protected com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Receipt>,Receipt> getReceiptDetailReceivedListener()
Create a listener forReceiptAPI
- Returns:
- listener to handle
ReceiptAPI
requests
-
getReceiptAPI
protected ReceiptAPI getReceiptAPI()
Get current instance ofReceiptAPI
- Returns:
ReceiptAPI
used on this presenter
-
onReceiptDetailReceivedFailed
protected void onReceiptDetailReceivedFailed(java.lang.String error)
Called after a failed response fromReceiptAPI.getReceipt(ReceiptParams, boolean, ListenerModel)
- Parameters:
error
- detail of the error
-
onReceiptDetailReceivedSuccess
protected void onReceiptDetailReceivedSuccess(Receipt data)
Called after a successful response fromReceiptAPI.getReceipt(ReceiptParams, boolean, ListenerModel)
- Parameters:
data
-Receipt
response
-
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 ReceiptDetailsView>
-
-