Class EventResponseDetailPresenter<T extends EventResponseDetailView>
- 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.event.ui.responses.detail.EventResponseDetailPresenter<T>
-
- Type Parameters:
T
- theEventResponseDetailView
class
- All Implemented Interfaces:
com.cheetahdigital.uikit.architecture.mvp.MvpPresenter<T>
public class EventResponseDetailPresenter<T extends EventResponseDetailView> extends com.cheetahdigital.uikit.architecture.lce.LcePresenter<T>
TheLcePresenter
class forEventResponseDetailActivity
-
-
Constructor Summary
Constructors Constructor Description EventResponseDetailPresenter(java.lang.String eventResponseId)
Constructor ofEventResponseDetailPresenter
EventResponseDetailPresenter(java.lang.String eventResponseId, EventsParams eventsParams)
Constructor ofEventResponseDetailPresenter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancelEvent()
Method for cancelling the event responseint
getBdsDelay()
Current bds delay usedprotected com.cheetahdigital.corekit.models.module.Listener<com.cheetahdigital.corekit.models.responses.SuccessResponse>
getCancelListener()
Create a listener forEventsAPI
protected com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<EventResponse>,EventResponse>
getEventRespondListener()
Create a listener forEventsAPI
protected EventsAPI
getEventsAPI()
Get current instance ofEventsAPI
void
loadData()
Load initial view data.protected void
onCancelFailed(java.lang.String error)
Called after a failed cancel requestprotected void
onCancelSuccess(com.cheetahdigital.corekit.models.responses.SuccessResponse data)
Called after a successful cancel requestprotected void
onEventResponseSuccess(EventResponse eventResponse)
Called after a successful request on event response detailsvoid
onLoadFailed(java.lang.String error)
Show the error viewvoid
setBdsDelay(int bdsDelay)
Delay used for broadcasting update
-
-
-
Constructor Detail
-
EventResponseDetailPresenter
public EventResponseDetailPresenter(java.lang.String eventResponseId)
Constructor ofEventResponseDetailPresenter
- Parameters:
eventResponseId
- id of the event response
-
EventResponseDetailPresenter
public EventResponseDetailPresenter(java.lang.String eventResponseId, EventsParams eventsParams)
Constructor ofEventResponseDetailPresenter
- Parameters:
eventResponseId
- id of the event responseeventsParams
- instance ofEventsParams
-
-
Method Detail
-
getCancelListener
protected com.cheetahdigital.corekit.models.module.Listener<com.cheetahdigital.corekit.models.responses.SuccessResponse> getCancelListener()
Create a listener forEventsAPI
- Returns:
- listener to handle
EventsAPI
requests
-
getEventRespondListener
protected com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<EventResponse>,EventResponse> getEventRespondListener()
Create a listener forEventsAPI
- Returns:
- listener to handle
EventsAPI
requests
-
getEventsAPI
protected EventsAPI getEventsAPI()
Get current instance ofEventsAPI
- Returns:
EventsAPI
used on this presenter
-
loadData
public void loadData()
Description copied from class:com.cheetahdigital.uikit.architecture.lce.LcePresenter
Load initial view data.- Specified by:
loadData
in classcom.cheetahdigital.uikit.architecture.lce.LcePresenter<T extends EventResponseDetailView>
-
onLoadFailed
public void onLoadFailed(java.lang.String error)
Description copied from class:com.cheetahdigital.uikit.architecture.lce.LcePresenter
Show the error view- Overrides:
onLoadFailed
in classcom.cheetahdigital.uikit.architecture.lce.LcePresenter<T extends EventResponseDetailView>
- Parameters:
error
- message detailing the error
-
onEventResponseSuccess
protected void onEventResponseSuccess(EventResponse eventResponse)
Called after a successful request on event response details- Parameters:
eventResponse
- response received inEventResponse
format
-
cancelEvent
public void cancelEvent()
Method for cancelling the event response
-
onCancelSuccess
protected void onCancelSuccess(com.cheetahdigital.corekit.models.responses.SuccessResponse data)
Called after a successful cancel request- Parameters:
data
- instance ofSuccessResponse
which contains the cancel response
-
onCancelFailed
protected void onCancelFailed(java.lang.String error)
Called after a failed cancel request- Parameters:
error
- details of the error
-
setBdsDelay
public void setBdsDelay(int bdsDelay)
Delay used for broadcasting update- Parameters:
bdsDelay
- value of the delay; Default is 3000
-
getBdsDelay
public int getBdsDelay()
Current bds delay used- Returns:
- value of the current bds delay
-
-