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 defaultChallengeParams
CheckInPresenter(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 void
checkIn()
Submit challenge response to check-in to thePlace
protected ListenerModel<BaseModel<Challenge>,Challenge>
getChallengeListener()
void
init(double latitude, double longitude)
Initialize theCheckInView
void
onLoadChallengeFailed(java.lang.String error)
Unable to get check in challengevoid
onLoadChallengeSuccess(Challenge data)
Check in challenge successfully loadedprotected void
onRespondSuccess(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
- theChallengeHeaders
params
- theChallengeParams
fields
- 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:ChallengeResponsePresenter
Notify the view that the challenge response is successful- Overrides:
onRespondSuccess
in classChallengeResponsePresenter<T extends CheckInView>
- Parameters:
data
- theResponse
-
getChallengeListener
protected ListenerModel<BaseModel<Challenge>,Challenge> getChallengeListener()
-
-