Class ShippingDetailsPresenter<T extends ShippingDetailsView>
- 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.profile.ui.shipping.ShippingDetailsPresenter<T>
-
- Type Parameters:
T- theMvpViewclass
- All Implemented Interfaces:
MvpPresenter<T>
public class ShippingDetailsPresenter<T extends ShippingDetailsView> extends LcePresenter<T>
TheMvpPresenterclass forShippingDetailsActivity
-
-
Constructor Summary
Constructors Constructor Description ShippingDetailsPresenter()Constructor for the Shipping Details PresenterShippingDetailsPresenter(ProfileParams profileParams)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Listener<BaseGenericModel<java.util.List<Metadata>>>getMetadataReceivedListener()Create a listener forProfileAPI.getProfileMetadata(ProfileParams, boolean, Listener)}.protected voidgetProfile()Call to get the Profile of the userprotected ProfileAPIgetProfileAPI()Get current instance ofProfileAPIprotected Listener<Profile>getProfileReceivedListener()Create a listener forProfileAPI.getProfile(ProfileParams, boolean, Listener).voidloadData()Load initial view data.protected voidonMetadataDownloadFailure(java.lang.String error)Called when getting metadata failsprotected voidonMetadataDownloadSuccess(java.util.List<Metadata> data)Called when getting metadata is successfulprotected voidonProfileDownloadFailure(java.lang.String error)Called when getting profile failsprotected voidonProfileDownloadSuccess(Profile data)Called when getting profile is successful-
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
-
ShippingDetailsPresenter
public ShippingDetailsPresenter()
Constructor for the Shipping Details Presenter
-
ShippingDetailsPresenter
public ShippingDetailsPresenter(ProfileParams profileParams)
-
-
Method Detail
-
getProfileReceivedListener
protected Listener<Profile> getProfileReceivedListener()
Create a listener forProfileAPI.getProfile(ProfileParams, boolean, Listener).- Returns:
- listener to handle requests
-
getMetadataReceivedListener
protected Listener<BaseGenericModel<java.util.List<Metadata>>> getMetadataReceivedListener()
Create a listener forProfileAPI.getProfileMetadata(ProfileParams, boolean, Listener)}.- Returns:
- listener to handle requests
-
getProfileAPI
protected ProfileAPI getProfileAPI()
Get current instance ofProfileAPI- Returns:
ProfileAPIused on this presenter
-
loadData
public void loadData()
Description copied from class:LcePresenterLoad initial view data.- Specified by:
loadDatain classLcePresenter<T extends ShippingDetailsView>
-
getProfile
protected void getProfile()
Call to get the Profile of the user
-
onProfileDownloadFailure
protected void onProfileDownloadFailure(java.lang.String error)
Called when getting profile fails- Parameters:
error- error message
-
onProfileDownloadSuccess
protected void onProfileDownloadSuccess(Profile data)
Called when getting profile is successful- Parameters:
data-Profile
-
onMetadataDownloadFailure
protected void onMetadataDownloadFailure(java.lang.String error)
Called when getting metadata fails- Parameters:
error- error message
-
-