Class HarvestHistoryTableHelper
- java.lang.Object
-
- dk.netarkivet.harvester.webinterface.HarvestHistoryTableHelper
-
public class HarvestHistoryTableHelper extends Object
Used to manage the model used in the domain harvest history page. See Harveststatus-perdomain.jsp.
-
-
Field Summary
Fields Modifier and Type Field Description static String
BYTES_HARVESTED_FIELD
static String
CONFIGURATION_NAME_FIELD
static String
DOCUMENTS_HARVESTED_FIELD
static String
HARVEST_NAME_FIELD
static String
HARVEST_NUMBER_FIELD
static String
JOB_ID_FIELD
static String
START_TIME_FIELD
static String
STOP_TIME_FIELD
static String
STOPPED_DUE_TO_FIELD
-
Constructor Summary
Constructors Constructor Description HarvestHistoryTableHelper(String domainNameParameter, String sortFieldParameter, String sortOrderParameter, String pageIndexParameter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
generateParameterStringForPaging()
long
getEndIndex()
long
getNumberOfResults()
String
getOrderAfterClick(String sortField)
Calculates the reverse sort order for this file.String
getOrderArrow(String sortField)
Calculates the sort order arrow for the headers of a sortable tableint
getPageIndex()
long
getStartIndex()
boolean
isNextPageAvailable()
boolean
isPreviousPageAvailable()
List<DomainHarvestInfo>
listCurrentPageHarvestHistory()
-
-
-
Field Detail
-
HARVEST_NAME_FIELD
public static final String HARVEST_NAME_FIELD
- See Also:
- Constant Field Values
-
HARVEST_NUMBER_FIELD
public static final String HARVEST_NUMBER_FIELD
- See Also:
- Constant Field Values
-
JOB_ID_FIELD
public static final String JOB_ID_FIELD
- See Also:
- Constant Field Values
-
CONFIGURATION_NAME_FIELD
public static final String CONFIGURATION_NAME_FIELD
- See Also:
- Constant Field Values
-
START_TIME_FIELD
public static final String START_TIME_FIELD
- See Also:
- Constant Field Values
-
STOP_TIME_FIELD
public static final String STOP_TIME_FIELD
- See Also:
- Constant Field Values
-
BYTES_HARVESTED_FIELD
public static final String BYTES_HARVESTED_FIELD
- See Also:
- Constant Field Values
-
DOCUMENTS_HARVESTED_FIELD
public static final String DOCUMENTS_HARVESTED_FIELD
- See Also:
- Constant Field Values
-
STOPPED_DUE_TO_FIELD
public static final String STOPPED_DUE_TO_FIELD
- See Also:
- Constant Field Values
-
-
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, elsefalse
-
isPreviousPageAvailable
public boolean isPreviousPageAvailable()
- Returns:
true
if the previous page is available, elsefalse
-
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
-
-