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

public Class MoveFilesCleanup

extends Object
implements CleanupJob
Class Inheritance
All Implemented Interfaces
org.jabref.logic.cleanup.CleanupJob
Imports
java.io.IOException, java.util.ArrayList, .List, java.util.function.Consumer, .Supplier, org.jabref.logic.FilePreferences, .JabRefException, org.jabref.logic.externalfiles.LinkedFileHandler, org.jabref.logic.l10n.Localization, org.jabref.model.FieldChange, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.BibEntry, .LinkedFile, org.jspecify.annotations.NonNull, org.slf4j.Logger, .LoggerFactory

Moves the file into the default file directory. Does not rename the file.

Field Summary

Modifier and TypeField and Description
private final Supplier<BibDatabaseContext>
private final FilePreferences
private final List<JabRefException>
private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

Overrides default org.jabref.logic.cleanup.CleanupJob.cleanup.

Cleans up the given entry, routing all BibEntry field mutations through the provided scheduler.

public List<FieldChange>
cleanup(BibEntry entry)

Implements org.jabref.logic.cleanup.CleanupJob.cleanup.

Cleans up the given entry and returns the list of changes made.

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

Field Detail

databaseContextback to summary
private final Supplier<BibDatabaseContext> databaseContext
filePreferencesback to summary
private final FilePreferences filePreferences
ioExceptionsback to summary
private final List<JabRefException> ioExceptions
LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

MoveFilesCleanupback to summary
public MoveFilesCleanup(@NonNull Supplier<BibDatabaseContext> databaseContext, @NonNull FilePreferences filePreferences)

Method Detail

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

Overrides default org.jabref.logic.cleanup.CleanupJob.cleanup.

Doc from org.jabref.logic.cleanup.CleanupJob.cleanup.

Cleans up the given entry, routing all BibEntry field mutations through the provided scheduler.

The scheduler must execute mutations synchronously (blocking the caller until complete), e.g. UiTaskExecutor::runAndWaitInJavaFXThread when called from a background thread, or Runnable::run when already on the correct thread.

The default implementation wraps the entire cleanup(BibEntry) call in the scheduler, which is safe but puts all computation on the scheduler's thread. Override this method to keep expensive computation on the calling (background) thread and only schedule the actual field mutations.

Annotations
@Override
cleanupback to summary
public List<FieldChange> cleanup(BibEntry entry)

Implements org.jabref.logic.cleanup.CleanupJob.cleanup.

Doc from org.jabref.logic.cleanup.CleanupJob.cleanup.

Cleans up the given entry and returns the list of changes made.

Annotations
@Override
getIoExceptionsback to summary
public List<JabRefException> getIoExceptions()