Verified Owner
Top Description Fields Constructors Methods
org.jabref.gui.mergeentries

public Class BatchEntryMergeTask

extends BackgroundTask<Void>
Class Inheritance
Imports
java.util.ArrayList, .List, .Optional, org.jabref.gui.actions.StandardActions, org.jabref.logic.importer.fetcher.MergingIdBasedFetcher, org.jabref.logic.l10n.Localization, org.jabref.logic.undo.UndoManager, .UndoSuspension, org.jabref.logic.util.BackgroundTask, .NotificationService, org.jabref.model.entry.BibEntry, org.jabref.model.undo.CompoundEdit, org.slf4j.Logger, .LoggerFactory

A background task that handles fetching and merging of bibliography entries. This implementation provides improved concurrency handling, better Optional usage, and more robust error handling.

Field Summary

Modifier and TypeField and Description
private final CompoundEdit
private final List<BibEntry>
private final MergingIdBasedFetcher
private final char
private static final Logger
private final NotificationService
private int
private int
private final UndoManager

Constructor Summary

AccessConstructor and Description
public
BatchEntryMergeTask(List<BibEntry> entries, MergingIdBasedFetcher fetcher, UndoManager undoManager, NotificationService notificationService, char keywordSeparator)

Method Summary

Modifier and TypeMethod and Description
public Void
call()

private void
private void
notifySuccess(int updateCount)

private List<String>
private Optional<String>
private Optional<String>
private void
updateUndoManager(List<String> updatedEntries)

Field Detail

compoundEditback to summary
private final CompoundEdit compoundEdit
entriesback to summary
private final List<BibEntry> entries
fetcherback to summary
private final MergingIdBasedFetcher fetcher
keywordSeparatorback to summary
private final char keywordSeparator
LOGGERback to summary
private static final Logger LOGGER
notificationServiceback to summary
private final NotificationService notificationService
processedEntriesback to summary
private int processedEntries
successfulUpdatesback to summary
private int successfulUpdates
undoManagerback to summary
private final UndoManager undoManager

Constructor Detail

BatchEntryMergeTaskback to summary
public BatchEntryMergeTask(List<BibEntry> entries, MergingIdBasedFetcher fetcher, UndoManager undoManager, NotificationService notificationService, char keywordSeparator)

Method Detail

callback to summary
public Void call()
Annotations
@Override
notifyCancellationback to summary
private void notifyCancellation()
notifySuccessback to summary
private void notifySuccess(int updateCount)
processMergeEntriesback to summary
private List<String> processMergeEntries()
processSingleEntryback to summary
private Optional<String> processSingleEntry(BibEntry entry)
processSingleEntryWithProgressback to summary
private Optional<String> processSingleEntryWithProgress(BibEntry entry)
updateUndoManagerback to summary
private void updateUndoManager(List<String> updatedEntries)