public class HarvestStatus extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log
The logger to use.
|
Constructor and Description |
---|
HarvestStatus(long fullResultsCount,
List<JobStatusInfo> jobs)
Constructor for the HarvestStatus class.
|
Modifier and Type | Method and Description |
---|---|
long |
getFullResultsCount() |
List<JobStatusInfo> |
getJobStatusInfo() |
static HarvestStatus |
getjobStatusList(HarvestStatusQuery query)
Calculate list of job information to be shown.
|
static boolean |
isNextLinkActive(long pageSize,
long totalResultsCount,
long endIndex)
Check if next link is active.
|
static boolean |
isPreviousLinkActive(long pageSize,
long totalResultsCount,
long startIndex)
Check if previous link is active.
|
static String |
makeHarvestRunLink(long harvestID,
int harvestRun)
Create a link to the harvest-run page for a given run.
|
static void |
processRequest(javax.servlet.jsp.PageContext context,
I18n i18n)
Process a request from Harveststatus-alljobs.
|
static void |
rejectFailedJob(javax.servlet.jsp.PageContext context,
I18n i18n,
Long jobID)
Marks a failed job as rejected for resubmission.
|
static void |
unrejectRejectedJob(javax.servlet.jsp.PageContext context,
I18n i18n,
Long jobID)
Marks as failed.
|
protected static final org.slf4j.Logger log
public HarvestStatus(long fullResultsCount, List<JobStatusInfo> jobs)
fullResultsCount
- The total number of entries in the full resultsetjobs
- The list of jobspublic long getFullResultsCount()
public List<JobStatusInfo> getJobStatusInfo()
public static void processRequest(javax.servlet.jsp.PageContext context, I18n i18n) throws ForwardedToErrorPage
Will resubmit a job if requested, otherwise do nothing.
context
- The web context used for processingi18n
- The resource i18n context.ForwardedToErrorPage
- If an error occurs that stops processing and forwards the user to an error page.public static void rejectFailedJob(javax.servlet.jsp.PageContext context, I18n i18n, Long jobID)
context
- the context for forwarding errorsi18n
- the internationalisation to usejobID
- the job to rejectpublic static void unrejectRejectedJob(javax.servlet.jsp.PageContext context, I18n i18n, Long jobID)
context
- the context for forwarding errorsi18n
- the internationalisation to usejobID
- the job to unrejectpublic static String makeHarvestRunLink(long harvestID, int harvestRun)
harvestID
- The ID of the harvestharvestRun
- The run # of the harvest (always 0 for snapshots)public static HarvestStatus getjobStatusList(HarvestStatusQuery query)
query
- the query with its filters.public static boolean isNextLinkActive(long pageSize, long totalResultsCount, long endIndex)
pageSize
- the size of the pagetotalResultsCount
- the number of results.endIndex
- the index of the last result shown on this pagepublic static boolean isPreviousLinkActive(long pageSize, long totalResultsCount, long startIndex)
pageSize
- the size of the pagetotalResultsCount
- the number of results.startIndex
- the index of the first result shown on this pageCopyright © 2005–2016 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.