Class EventDetailsPresenter<T extends EventDetailsView>

  • Type Parameters:
    T - the EventDetailsView class
    All Implemented Interfaces:
    com.cheetahdigital.uikit.architecture.mvp.MvpPresenter<T>

    public class EventDetailsPresenter<T extends EventDetailsView>
    extends com.cheetahdigital.uikit.architecture.lce.LcePresenter<T>
    The LcePresenter class for EventDetailsActivity
    • 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<Event>,​Event> getEventReceivedListener()
      Create a listener for EventsAPI
      protected EventsAPI getEventsAPI()
      Get current instance of EventsAPI
      protected com.cheetahdigital.corekit.models.module.Listener<com.cheetahdigital.corekit.models.responses.SuccessResponse> getRespondListener()
      Create a listener for EventsAPI
      void loadData()
      Load initial view data.
      protected void onEventDownloadFailed​(java.lang.String error)
      Called after a failed request for fetching event
      protected void onEventDownloadSuccess​(Event event)
      Called upon receiving a successful call on fetching an event
      void onLoadFailed​(java.lang.String error)
      Show the error view
      protected void onRespondFailed​(java.lang.String error)
      Called after a failed respond
      protected void onRespondSuccess​(com.cheetahdigital.corekit.models.responses.SuccessResponse data)
      Called after a successful respond to event
      void respondToEvent​(java.lang.String latLongJSONRaw)
      Respond to the current event
      void respondToEvent​(java.lang.String latLongJSONRaw, EventsParams eventsParams)
      Respond to the current event
      • Methods inherited from class com.cheetahdigital.uikit.architecture.lce.LcePresenter

        onLoadSuccess
      • Methods inherited from class com.cheetahdigital.uikit.architecture.mvp.MvpNullObjectBasePresenter

        attachView, detachView, getView
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EventDetailsPresenter

        public EventDetailsPresenter​(java.lang.String eventId)
        Constructor for EventDetailsPresenter
        Parameters:
        eventId - id of the event
    • Method Detail

      • getRespondListener

        protected com.cheetahdigital.corekit.models.module.Listener<com.cheetahdigital.corekit.models.responses.SuccessResponse> getRespondListener()
        Create a listener for EventsAPI
        Returns:
        listener to handle EventsAPI requests
      • getEventReceivedListener

        protected com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Event>,​Event> getEventReceivedListener()
        Create a listener for EventsAPI
        Returns:
        listener to handle EventsAPI requests
      • loadData

        public void loadData()
        Description copied from class: com.cheetahdigital.uikit.architecture.lce.LcePresenter
        Load initial view data.
        Specified by:
        loadData in class com.cheetahdigital.uikit.architecture.lce.LcePresenter<T extends EventDetailsView>
      • respondToEvent

        public void respondToEvent​(java.lang.String latLongJSONRaw)
        Respond to the current event
        Parameters:
        latLongJSONRaw - long lat to be added in header
      • respondToEvent

        public void respondToEvent​(java.lang.String latLongJSONRaw,
                                   EventsParams eventsParams)
        Respond to the current event
        Parameters:
        latLongJSONRaw - long lat to be added in header
        eventsParams - EventsParams to use for responding
      • onEventDownloadSuccess

        protected void onEventDownloadSuccess​(Event event)
        Called upon receiving a successful call on fetching an event
        Parameters:
        event - received response parse in Event
      • onEventDownloadFailed

        protected void onEventDownloadFailed​(java.lang.String error)
        Called after a failed request for fetching event
        Parameters:
        error - detail of the error
      • onRespondSuccess

        protected void onRespondSuccess​(com.cheetahdigital.corekit.models.responses.SuccessResponse data)
        Called after a successful respond to event
        Parameters:
        data - response received
      • onRespondFailed

        protected void onRespondFailed​(java.lang.String error)
        Called after a failed respond
        Parameters:
        error - detail of the error
      • 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 class com.cheetahdigital.uikit.architecture.lce.LcePresenter<T extends EventDetailsView>
        Parameters:
        error - message detailing the error