Class UpdateAttributePresenter<T extends UpdateAttributeView>
- java.lang.Object
 - 
- com.cheetahdigital.uikit.architecture.mvp.MvpNullObjectBasePresenter<V>
 - 
- com.cheetahdigital.uikit.architecture.mvp.Presenter<T>
 - 
- com.cheetahdigital.challenges.ui.responses.base.ChallengeResponsePresenter<T>
 - 
- com.cheetahdigital.challenges.ui.responses.profile.attribute.UpdateAttributePresenter<T>
 
 
 
 
 
- 
- All Implemented Interfaces:
 com.cheetahdigital.uikit.architecture.mvp.MvpPresenter<T>
public class UpdateAttributePresenter<T extends UpdateAttributeView> extends ChallengeResponsePresenter<T>
Presenter that is used byUpdateAttributeFragment 
- 
- 
Constructor Summary
Constructors Constructor Description UpdateAttributePresenter(java.lang.String id, java.lang.String responseId, ChallengeParams params, UpdateProfileAttrResponseSetting responseSetting)Create the presenter with a givenChallengeParamsUpdateAttributePresenter(java.lang.String id, java.lang.String responseId, UpdateProfileAttrResponseSetting responseSetting)Create the presenter with defaultChallengeParams 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected okhttp3.RequestBodygetRequestBody(java.lang.String json)Get Request Bodyvoidinit()Initialize theUpdateAttributeViewprotected java.lang.Stringserialize(java.util.List<ProfileAttribute> attributes)Serialize the profile attributesvoidupdateAttributes(java.util.List<ProfileAttribute> attrs)Submit challenge response to update profile attributes- 
Methods inherited from class com.cheetahdigital.challenges.ui.responses.base.ChallengeResponsePresenter
getChallengesAPI, getRespondListener, onRespondFailed, onRespondSuccess, submitChallengeResponse, submitChallengeResponse, submitChallengeResponse, submitChallengeResponse, submitChallengeResponse, submitChallengeResponse 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
UpdateAttributePresenter
public UpdateAttributePresenter(java.lang.String id, java.lang.String responseId, UpdateProfileAttrResponseSetting responseSetting)Create the presenter with defaultChallengeParams- Parameters:
 id- challenge idresponseId- response idresponseSetting- theUpdateProfileAttrResponseSetting
 
- 
UpdateAttributePresenter
public UpdateAttributePresenter(java.lang.String id, java.lang.String responseId, ChallengeParams params, UpdateProfileAttrResponseSetting responseSetting)Create the presenter with a givenChallengeParams- Parameters:
 id- challenge idresponseId- response idparams- theChallengeParamsresponseSetting- theUpdateProfileAttrResponseSetting
 
 - 
 
- 
Method Detail
- 
init
public void init()
Initialize theUpdateAttributeView 
- 
updateAttributes
public void updateAttributes(java.util.List<ProfileAttribute> attrs)
Submit challenge response to update profile attributes- Parameters:
 attrs- list ofProfileAttribute
 
- 
getRequestBody
@NotNull protected okhttp3.RequestBody getRequestBody(java.lang.String json)
Get Request Body- Parameters:
 json- json to be added in the request bofy- Returns:
 - Request Body
 
 
- 
serialize
protected java.lang.String serialize(java.util.List<ProfileAttribute> attributes)
Serialize the profile attributes- Parameters:
 attributes- contains the profile attributes- Returns:
 - json object
 
 
 - 
 
 -