Class HarvestHistoryTableHelper


  • public class HarvestHistoryTableHelper
    extends Object
    Used to manage the model used in the domain harvest history page. See Harveststatus-perdomain.jsp.
    • Constructor Detail

      • HarvestHistoryTableHelper

        public HarvestHistoryTableHelper​(String domainNameParameter,
                                         String sortFieldParameter,
                                         String sortOrderParameter,
                                         String pageIndexParameter)
    • Method Detail

      • listCurrentPageHarvestHistory

        public List<DomainHarvestInfo> listCurrentPageHarvestHistory()
        Returns:
        Return the list of DomainHarvestInfos for the current page.
      • getStartIndex

        public long getStartIndex()
        Returns:
        the index of the first result on the current page. The result is the full list of DomainHarvestInfo objects for this domain for the selected sorting.
      • getEndIndex

        public long getEndIndex()
        Returns:
        the index of the last result on the current page. The result is the full list of DomainHarvestInfo objects for this domain for the selected sorting.
      • getPageIndex

        public int getPageIndex()
        Returns:
        The index of the current page.
      • getNumberOfResults

        public long getNumberOfResults()
        Returns:
        The total number of DomainHarvestInfo objects in the db for this domain.
      • isNextPageAvailable

        public boolean isNextPageAvailable()
        Returns:
        true if the next page is available, else false
      • isPreviousPageAvailable

        public boolean isPreviousPageAvailable()
        Returns:
        true if the previous page is available, else false
      • generateParameterStringForPaging

        public String generateParameterStringForPaging()
        Returns:
        A string representing the parameters for the javascripting next/previous link functionality.
      • getOrderArrow

        public String getOrderArrow​(String sortField)
        Calculates the sort order arrow for the headers of a sortable table
        Parameters:
        sortField - The sort field to find a arrow for.
        Returns:
        The relevant arrow for the indicated field. Will be the reverse if the sorting is already on this field else an empty string will be returned
      • getOrderAfterClick

        public String getOrderAfterClick​(String sortField)
        Calculates the reverse sort order for this file. If the field isn't used for ordering, Constants.SORT_ORDER_ASC is returned.
        Parameters:
        sortField - The sort field to find a new order for.
        Returns:
        The relevant asc/desc string.