Class PagedResourceAction

    • Constructor Detail

      • PagedResourceAction

        public PagedResourceAction()
    • Method Detail

      • readAllResources

        protected abstract List readAllResources​(SessionState state)
        Implement this to return alist of all the resources that there are to page. Sort them as appropriate, and apply search criteria.
      • addViewPagingMenus

        protected void addViewPagingMenus​(Menu bar,
                                          SessionState state)
        Add the menus for a view mode for paging.
      • addListPagingMenus

        protected void addListPagingMenus​(Menu bar,
                                          SessionState state)
        Add the menus for a list mode for paging.
      • addSearchMenus

        protected void addSearchMenus​(Menu bar,
                                      SessionState state)
        Add the menus for search.
      • prepPage

        protected List prepPage​(SessionState state)
        Prepare the current page of messages to display.
        Returns:
        List of MailArchiveMessage to display on this page.
      • doView_next

        public void doView_next​(RunData runData,
                                Context context)
        Handle a next-message (view) request.
      • doList_first

        public void doList_first​(RunData runData,
                                 Context context)
        Handle a first-message page (list) request.
      • doList_last

        public void doList_last​(RunData runData,
                                Context context)
        Handle a last-message page (list) request.
      • doList_next

        public void doList_next​(RunData runData,
                                Context context)
        Handle a next-page (list) request.
      • doView_prev

        public void doView_prev​(RunData runData,
                                Context context)
        Handle a prev-message (view) request.
      • doList_prev

        public void doList_prev​(RunData runData,
                                Context context)
        Handle a prev-page (list) request.
      • doSearch

        public void doSearch​(RunData runData,
                             Context context)
        Handle a Search request.
      • doSearch_clear

        public void doSearch_clear​(RunData runData,
                                   Context context)
        Handle a Search Clear request.
      • resetPaging

        protected void resetPaging​(SessionState state)
        Reset to the first page
      • findResourceInList

        protected int findResourceInList​(List resources,
                                         String id)
        Find the resource with this id in the list.
        Parameters:
        messages - The list of messages.
        id - The message id.
        Returns:
        The index position in the list of the message with this id, or -1 if not found.