Class EventListPresenter<T extends EventListView>

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

    public class EventListPresenter<T extends EventListView>
    extends com.cheetahdigital.uikit.widget.list.EndlessListPresenter<T>
    The EndlessListPresenter class for EventListFragment
    • Method Detail

      • getEventsReceivedListener

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

        protected com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<EventCategories>,​EventCategories> getEventCategoriesReceivedListener()
        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 EventListView>
      • loadMore

        public void loadMore​(int currentPage)
        Overrides:
        loadMore in class com.cheetahdigital.uikit.widget.list.EndlessListPresenter<T extends EventListView>
      • onLoadMoreSuccess

        public void onLoadMoreSuccess​(com.cheetahdigital.corekit.models.data.BaseData data)
        Description copied from class: com.cheetahdigital.uikit.widget.list.EndlessListPresenter
        End of load more with success request
        Overrides:
        onLoadMoreSuccess in class com.cheetahdigital.uikit.widget.list.EndlessListPresenter<T extends EventListView>
        Parameters:
        data - instance of BaseData passed
      • onEventCategoriesDownloadSuccess

        protected void onEventCategoriesDownloadSuccess​(EventCategories data)
        Called after a successful event category request
        Parameters:
        data - received response in EventCategories format
      • setFilterEnabled

        public void setFilterEnabled​(boolean isFilterEnabled)
        Set enabling of filter
        Parameters:
        isFilterEnabled - true to enable category filtering, else false
      • updateSelectedCategory

        public void updateSelectedCategory​(int position)
        Update selected category
        Parameters:
        position - index of the category from the current list
      • getSelectedCategory

        public java.lang.String getSelectedCategory()
        Get the current value for selected category
        Returns:
        value of the selected category
      • setEventCategoryParams

        public void setEventCategoryParams​(@NonNull
                                           EventsParams eventCategoryParams)
        Set the category params for fetching list of category
        Parameters:
        eventCategoryParams - instance of EventsParams
      • refreshData

        public void refreshData()
        Description copied from class: com.cheetahdigital.uikit.architecture.refreshable.RefreshablePresenter
        Start the refresh view data.
        Overrides:
        refreshData in class com.cheetahdigital.uikit.architecture.refreshable.RefreshablePresenter<T extends EventListView>
      • onRefreshSuccess

        public void onRefreshSuccess​(com.cheetahdigital.corekit.models.data.BaseData data)
        Description copied from class: com.cheetahdigital.uikit.architecture.refreshable.RefreshablePresenter
        End of refresh with success request.
        Overrides:
        onRefreshSuccess in class com.cheetahdigital.uikit.architecture.refreshable.RefreshablePresenter<T extends EventListView>
        Parameters:
        data - the BaseData.