Class CheckInPresenter<T extends CheckInView>
- 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.checkin.CheckInPresenter<T>
-
- All Implemented Interfaces:
MvpPresenter<T>
public class CheckInPresenter<T extends CheckInView> extends ChallengeResponsePresenter<T>
Presenter that is used byCheckInFragment
-
-
Constructor Summary
Constructors Constructor Description CheckInPresenter(java.lang.String id, java.lang.String responseId)Create the presenter with defaultChallengeParamsCheckInPresenter(java.lang.String id, java.lang.String responseId, ChallengeHeaders headers, ChallengeParams params, ChallengeFields fields)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckIn()Submit challenge response to check-in to thePlaceprotected ListenerModel<BaseModel<Challenge>,Challenge>getChallengeListener()voidinit(double latitude, double longitude)Initialize theCheckInViewvoidonLoadChallengeFailed(java.lang.String error)Unable to get check in challengevoidonLoadChallengeSuccess(Challenge data)Check in challenge successfully loadedprotected voidonRespondSuccess(Response data)Notify the view that the challenge response is successful-
Methods inherited from class com.cheetahdigital.challenges.ui.responses.base.ChallengeResponsePresenter
getChallengesAPI, getRespondListener, onRespondFailed, submitChallengeResponse, submitChallengeResponse, submitChallengeResponse, submitChallengeResponse, submitChallengeResponse, submitChallengeResponse
-
Methods inherited from class com.cheetahdigital.uikit.architecture.mvp.MvpNullObjectBasePresenter
attachView, detachView, getView
-
-
-
-
Constructor Detail
-
CheckInPresenter
public CheckInPresenter(java.lang.String id, java.lang.String responseId)Create the presenter with defaultChallengeParams- Parameters:
id- challenge idresponseId- response id
-
CheckInPresenter
public CheckInPresenter(java.lang.String id, java.lang.String responseId, ChallengeHeaders headers, ChallengeParams params, ChallengeFields fields)- Parameters:
id- challenge idresponseId- response idheaders- theChallengeHeadersparams- theChallengeParamsfields- theChallengeFields
-
-
Method Detail
-
init
public void init(double latitude, double longitude)Initialize theCheckInView- Parameters:
latitude- latitude valuelongitude- longitude value
-
onLoadChallengeSuccess
public void onLoadChallengeSuccess(Challenge data)
Check in challenge successfully loaded- Parameters:
data-Challenge
-
onLoadChallengeFailed
public void onLoadChallengeFailed(java.lang.String error)
Unable to get check in challenge- Parameters:
error- message
-
checkIn
public void checkIn()
Submit challenge response to check-in to thePlace
-
onRespondSuccess
protected void onRespondSuccess(Response data)
Description copied from class:ChallengeResponsePresenterNotify the view that the challenge response is successful- Overrides:
onRespondSuccessin classChallengeResponsePresenter<T extends CheckInView>- Parameters:
data- theResponse
-
getChallengeListener
protected ListenerModel<BaseModel<Challenge>,Challenge> getChallengeListener()
-
-