use of org.apache.archiva.admin.model.beans.IndexingTask in project archiva by apache.
the class DefaultRepositoryTaskAdministration method updateIndexInfo.
public void updateIndexInfo(ScanStatus scanStatus, ArtifactIndexingTask runningIndexingTask, List<ArtifactIndexingTask> taskQueue) {
List<IndexingTask> newIndexQueue = new ArrayList<>();
if (runningIndexingTask != null) {
IndexingTask taskInfo = getIndexingTaskInfo(runningIndexingTask);
taskInfo.setRunning(true);
newIndexQueue.add(taskInfo);
}
newIndexQueue.addAll(taskQueue.stream().map(task -> getIndexingTaskInfo(task)).collect(Collectors.toList()));
scanStatus.setIndexingQueue(newIndexQueue);
}
use of org.apache.archiva.admin.model.beans.IndexingTask in project archiva by apache.
the class DefaultRepositoryTaskAdministration method getIndexingTaskInfo.
public static IndexingTask getIndexingTaskInfo(ArtifactIndexingTask repositoryTask) {
IndexingTask indexingTask = new IndexingTask();
indexingTask.setFullScan(repositoryTask.isExecuteOnEntireRepo());
indexingTask.setUpdateOnly(repositoryTask.isOnlyUpdate());
indexingTask.setResource(repositoryTask.getResourceFile() == null ? "" : repositoryTask.getResourceFile().toString());
indexingTask.setMaxExecutionTimeMs(repositoryTask.getMaxExecutionTime());
indexingTask.setRepositoryId(repositoryTask.getRepository().getId());
return indexingTask;
}
Aggregations