Class ProfileEditPresenter<T extends ProfileEditView>
- 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.profile.ui.profile.ProfilePresenter<T>
-
- com.cheetahdigital.profile.ui.profile.ProfileEditPresenter<T>
-
- All Implemented Interfaces:
com.cheetahdigital.uikit.architecture.mvp.MvpPresenter<T>
public class ProfileEditPresenter<T extends ProfileEditView> extends ProfilePresenter<T>
This presenter class contains StellarSDK calls for the Profile Module. This is a child class of theProfilePresenter
which is bound to theProfileEditView
.
-
-
Constructor Summary
Constructors Constructor Description ProfileEditPresenter()
Basic ConstructorProfileEditPresenter(ProfileParams params)
Public Constructor accepting parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Avatar>,Avatar>
getUpdateAvatarSuccessListener()
Create a listener forProfileAPI.updateAvatar(ProfileParams, MultipartBody.Part, ListenerModel)
.protected com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<MemberAttributes>,MemberAttributes>
getUpdateProfileListener()
Create a listener forProfileAPI.updateProfile(ProfileParams, ProfileFields, ListenerModel)
.protected void
onUpdateAvatarFailure(java.lang.String error)
Called when update avatar failsprotected void
onUpdateAvatarSuccess(Avatar data)
Called when update avatar is successfulprotected void
onUpdateProfileFailure(java.lang.String error)
Called when update profile failsprotected void
onUpdateProfileSuccess(MemberAttributes data)
Called when update profile is successfulvoid
updateAvatar(com.cheetahdigital.uikit.helper.video.MediaFile imageFile)
Updates the avatarvoid
updateAvatar(com.cheetahdigital.uikit.helper.video.MediaFile imageFile, ProfileParams params)
Updates the avatarvoid
updateProfile(ProfileParams params, ProfileFields fields)
Updates profile details-
Methods inherited from class com.cheetahdigital.profile.ui.profile.ProfilePresenter
deleteAccount, getDeleteAccountListener, getMetadataReceivedListener, getProfileAPI, getProfileReceivedListener, getRequestOtpListener, loadData, loadProfile, onDeleteAccountFailure, onDeleteAccountSuccess, onMetadataDownloadFailure, onMetadataDownloadSuccess, onProfileDownloadFailure, onProfileDownloadSuccess, onRefreshFailed, onRequestOtpFailure, onRequestOtpSuccess, refreshData, requestOtpCode
-
Methods inherited from class com.cheetahdigital.uikit.architecture.refreshable.RefreshablePresenter
isRefreshing, onRefreshSuccess
-
Methods inherited from class com.cheetahdigital.uikit.architecture.lce.LcePresenter
onLoadFailed, onLoadSuccess
-
-
-
-
Constructor Detail
-
ProfileEditPresenter
public ProfileEditPresenter()
Basic Constructor
-
ProfileEditPresenter
public ProfileEditPresenter(ProfileParams params)
Public Constructor accepting parameters- Parameters:
params
-ProfileParams
-
-
Method Detail
-
getUpdateAvatarSuccessListener
protected com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Avatar>,Avatar> getUpdateAvatarSuccessListener()
Create a listener forProfileAPI.updateAvatar(ProfileParams, MultipartBody.Part, ListenerModel)
.- Returns:
- listener to handle requests
-
getUpdateProfileListener
protected com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<MemberAttributes>,MemberAttributes> getUpdateProfileListener()
Create a listener forProfileAPI.updateProfile(ProfileParams, ProfileFields, ListenerModel)
.- Returns:
- listener to handle requests
-
updateAvatar
public void updateAvatar(com.cheetahdigital.uikit.helper.video.MediaFile imageFile)
Updates the avatar- Parameters:
imageFile
- new avatar
-
updateAvatar
public void updateAvatar(com.cheetahdigital.uikit.helper.video.MediaFile imageFile, ProfileParams params)
Updates the avatar- Parameters:
imageFile
- new avatarparams
-ProfileParams
-
updateProfile
public void updateProfile(ProfileParams params, ProfileFields fields)
Updates profile details- Parameters:
params
-ProfileParams
fields
-ProfileFields
-
onUpdateAvatarFailure
protected void onUpdateAvatarFailure(java.lang.String error)
Called when update avatar fails- Parameters:
error
- error message
-
onUpdateAvatarSuccess
protected void onUpdateAvatarSuccess(Avatar data)
Called when update avatar is successful- Parameters:
data
-Avatar
-
onUpdateProfileFailure
protected void onUpdateProfileFailure(java.lang.String error)
Called when update profile fails- Parameters:
error
- error message
-
onUpdateProfileSuccess
protected void onUpdateProfileSuccess(MemberAttributes data)
Called when update profile is successful- Parameters:
data
-MemberAttributes
-
-