| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
package org.xwiki.extension.job.history; |
| 21 |
|
|
| 22 |
|
import java.util.List; |
| 23 |
|
|
| 24 |
|
import org.xwiki.job.DefaultJobStatus; |
| 25 |
|
import org.xwiki.logging.LoggerManager; |
| 26 |
|
import org.xwiki.observation.ObservationManager; |
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
@version |
| 32 |
|
@since |
| 33 |
|
|
| |
|
| 42.9% |
Uncovered Elements: 8 (14) |
Complexity: 7 |
Complexity Density: 0.88 |
|
| 34 |
|
public class ReplayJobStatus extends DefaultJobStatus<ReplayRequest> |
| 35 |
|
{ |
| 36 |
|
private int currentRecordNumber; |
| 37 |
|
|
| 38 |
|
|
| 39 |
|
|
| 40 |
|
|
| 41 |
|
@param |
| 42 |
|
@param |
| 43 |
|
@param |
| 44 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 45 |
4 |
public ReplayJobStatus(ReplayRequest request, ObservationManager observationManager, LoggerManager loggerManager)... |
| 46 |
|
{ |
| 47 |
4 |
super(request, null, observationManager, loggerManager); |
| 48 |
|
} |
| 49 |
|
|
| 50 |
|
|
| 51 |
|
@return |
| 52 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 53 |
1 |
public int getCurrentRecordNumber()... |
| 54 |
|
{ |
| 55 |
1 |
return currentRecordNumber; |
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
@param |
| 62 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 63 |
2 |
public void setCurrentRecordNumber(int currentRecordNumber)... |
| 64 |
|
{ |
| 65 |
2 |
this.currentRecordNumber = currentRecordNumber; |
| 66 |
|
} |
| 67 |
|
|
| 68 |
|
|
| 69 |
|
@return |
| 70 |
|
|
| |
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 4 |
Complexity Density: 0.8 |
|
| 71 |
0 |
public ExtensionJobHistoryRecord getCurrentRecord()... |
| 72 |
|
{ |
| 73 |
0 |
int index = this.currentRecordNumber; |
| 74 |
0 |
List<ExtensionJobHistoryRecord> records = getRequest().getRecords(); |
| 75 |
0 |
if (records != null && index >= 0 && index < records.size()) { |
| 76 |
0 |
return records.get(index); |
| 77 |
|
} |
| 78 |
0 |
return null; |
| 79 |
|
} |
| 80 |
|
} |