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

public Class RenamePdfCleanup

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

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
RenamePdfCleanup(boolean onlyRelativePaths, @NonNull Supplier<BibDatabaseContext> databaseContext, FilePreferences filePreferences)

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.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

databaseContextback to summary
private final Supplier<BibDatabaseContext> databaseContext
filePreferencesback to summary
private final FilePreferences filePreferences
LOGGERback to summary
private static final Logger LOGGER
onlyRelativePathsback to summary
private final boolean onlyRelativePaths

Constructor Detail

RenamePdfCleanupback to summary
public RenamePdfCleanup(boolean onlyRelativePaths, @NonNull Supplier<BibDatabaseContext> databaseContext, 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