Verified Owner
Top Fields Constructors Methods
org.jabref.logic.cleanup

public Class CleanupWorker

extends Object
Class Inheritance
Annotations
@NullMarked
Imports
java.util.ArrayList, .List, java.util.function.Consumer, org.jabref.logic.FilePreferences, .JabRefException, org.jabref.logic.journals.AbbreviationType, .JournalAbbreviationRepository, org.jabref.logic.preferences.TimestampPreferences, org.jabref.model.FieldChange, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.BibEntry, org.jabref.model.entry.field.StandardField, org.jspecify.annotations.NullMarked, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private final JournalAbbreviationRepository
private final BibDatabaseContext
private final List<JabRefException>
private final FilePreferences
private static final Logger
private final TimestampPreferences
private final boolean

Constructor Summary

AccessConstructor and Description
public
CleanupWorker(BibDatabaseContext databaseContext, FilePreferences filePreferences, TimestampPreferences timestampPreferences, boolean useFJournalField, JournalAbbreviationRepository abbreviationRepository)

Method Summary

Modifier and TypeMethod and Description
public List<FieldChange>
public List<FieldChange>
cleanup(CleanupPreferences preset, BibEntry entry, Consumer<Runnable> mutationScheduler)

Cleans up the entry, routing all org.jabref.model.entry.BibEntry field mutations through the provided mutationScheduler.

private List<CleanupJob>
public List<JabRefException>
private CleanupJob
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

abbreviationRepositoryback to summary
private final JournalAbbreviationRepository abbreviationRepository
databaseContextback to summary
private final BibDatabaseContext databaseContext
failuresback to summary
private final List<JabRefException> failures
filePreferencesback to summary
private final FilePreferences filePreferences
LOGGERback to summary
private static final Logger LOGGER
timestampPreferencesback to summary
private final TimestampPreferences timestampPreferences
useFJournalFieldback to summary
private final boolean useFJournalField

Constructor Detail

CleanupWorkerback to summary
public CleanupWorker(BibDatabaseContext databaseContext, FilePreferences filePreferences, TimestampPreferences timestampPreferences, boolean useFJournalField, JournalAbbreviationRepository abbreviationRepository)

Method Detail

cleanupback to summary
public List<FieldChange> cleanup(CleanupPreferences preset, BibEntry entry)
cleanupback to summary
public List<FieldChange> cleanup(CleanupPreferences preset, BibEntry entry, Consumer<Runnable> mutationScheduler)

Cleans up the entry, routing all org.jabref.model.entry.BibEntry field mutations through the provided mutationScheduler.

Pass UiTaskExecutor::runAndWaitInJavaFXThread when calling from a background thread so that field mutations (which fire JavaFX listeners) are dispatched to the FX thread.

determineCleanupActionsback to summary
private List<CleanupJob> determineCleanupActions(CleanupPreferences preset)
getFailuresback to summary
public List<JabRefException> getFailures()
toJobback to summary
private CleanupJob toJob(CleanupPreferences.CleanupStep action)