The save operation is loaded off of the GUI thread using org.. Callers can query whether the
operation was canceled, or whether it was successful.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | |
| public static enum | SaveDatabaseAction.
|
| Modifier and Type | Field and Description |
|---|---|
| private final DialogService | |
| private final BibEntryTypesManager | |
| private final GitHandlerRegistry | |
| private final JournalAbbreviationRepository | |
| private final LibraryTab | |
| private static final Logger | |
| private final GuiPreferences | |
| private final StateManager | |
| private final TaskExecutor |
| Access | Constructor and Description |
|---|---|
| public | SaveDatabaseAction(LibraryTab libraryTab, DialogService dialogService, GuiPreferences preferences, BibEntryTypesManager entryTypesManager, StateManager stateManager, JournalAbbreviationRepository journalAbbreviationRepository)
|
| public | SaveDatabaseAction(LibraryTab libraryTab, DialogService dialogService, GuiPreferences preferences, BibEntryTypesManager entryTypesManager, StateManager stateManager, JournalAbbreviationRepository journalAbbreviationRepository, GitHandlerRegistry gitHandlerRegistry, TaskExecutor taskExecutor)
|
| Modifier and Type | Method and Description |
|---|---|
| private Optional | |
| private void | |
| private static AtomicFileWriter | createFileWriter(Path file, Charset encoding, boolean keepBackup, @Nullable FileSnapshot expectedState)
|
| private SelfContainedSaveOrder | |
| private static void | |
| public SaveDatabaseAction. | |
| public SaveDatabaseAction. | |
| private SaveDatabaseAction. | save(BibDatabaseContext bibDatabaseContext, SaveDatabaseAction.
|
| private SaveDatabaseAction. | |
| public void | |
| public boolean | |
| pack-priv boolean | |
| pack-priv boolean | saveAs(Path
the new file name to save the database to. This is stored in the database context of the panel upon successful save. file, SaveDatabaseAction.Returns: true on successful save |
| private @Nullable FileSnapshot | saveDatabase(Path file, boolean selectedOnly, Charset encoding, SaveType saveType, SelfContainedSaveOrder saveOrder, @Nullable FileSnapshot expectedState)
Returns: the state of the file as committed by this save (or by its encoding retry), |
| public void | |
| private @Nullable FileSnapshot | saveWithDifferentEncoding(Path file, boolean selectedOnly, Charset encoding, Set<Character> encodingProblems, SaveType saveType, SelfContainedSaveOrder saveOrder, @Nullable FileSnapshot committedState)
Returns: the state committed by the retry, or |
| public SaveDatabaseAction. | saveWithoutGitAutoCommit(SaveDatabaseAction.
Saves the library without triggering the automatic Git commit configured in the library properties. |
| dialogService | back to summary |
|---|---|
| private final DialogService dialogService | |
| entryTypesManager | back to summary |
|---|---|
| private final BibEntryTypesManager entryTypesManager | |
| gitHandlerRegistry | back to summary |
|---|---|
| private final GitHandlerRegistry gitHandlerRegistry | |
| journalAbbreviationRepository | back to summary |
|---|---|
| private final JournalAbbreviationRepository journalAbbreviationRepository | |
| libraryTab | back to summary |
|---|---|
| private final LibraryTab libraryTab | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| preferences | back to summary |
|---|---|
| private final GuiPreferences preferences | |
| stateManager | back to summary |
|---|---|
| private final StateManager stateManager | |
| taskExecutor | back to summary |
|---|---|
| private final TaskExecutor taskExecutor | |
| SaveDatabaseAction | back to summary |
|---|---|
| public SaveDatabaseAction(LibraryTab libraryTab, DialogService dialogService, GuiPreferences preferences, BibEntryTypesManager entryTypesManager, StateManager stateManager, JournalAbbreviationRepository journalAbbreviationRepository) | |
| SaveDatabaseAction | back to summary |
|---|---|
| public SaveDatabaseAction(LibraryTab libraryTab, DialogService dialogService, GuiPreferences preferences, BibEntryTypesManager entryTypesManager, StateManager stateManager, JournalAbbreviationRepository journalAbbreviationRepository, GitHandlerRegistry gitHandlerRegistry, TaskExecutor taskExecutor) | |
| askForSavePath | back to summary |
|---|---|
| private Optional Asks the user for the path to save to. Stores the directory to the preferences, which is used next time when opening the dialog. | |
| commitToGit | back to summary |
|---|---|
| private void commitToGit(Path targetPath) | |
| createFileWriter | back to summary |
|---|---|
| private static AtomicFileWriter createFileWriter(Path file, Charset encoding, boolean keepBackup, @Nullable FileSnapshot expectedState) throws org.jabref.logic.exporter.SaveException | |
| getSaveOrder | back to summary |
|---|---|
| private SelfContainedSaveOrder getSaveOrder() | |
| runSaveMutation | back to summary |
|---|---|
| private static void runSaveMutation(Runnable mutation) | |
| save | back to summary |
|---|---|
| public SaveDatabaseAction. | |
| save | back to summary |
|---|---|
| public SaveDatabaseAction. | |
| save | back to summary |
|---|---|
| private SaveDatabaseAction. | |
| save | back to summary |
|---|---|
| private SaveDatabaseAction. | |
| saveAs | back to summary |
|---|---|
| public void saveAs() Asks the user for the path and saves afterward | |
| saveAs | back to summary |
|---|---|
| public boolean saveAs(Path file) | |
| saveAs | back to summary |
|---|---|
| pack-priv boolean saveAs(Path file, SaveDatabaseAction. | |
| saveAs | back to summary |
|---|---|
pack-priv boolean saveAs(Path file, SaveDatabaseAction.
| |
| saveDatabase | back to summary |
|---|---|
private @Nullable FileSnapshot saveDatabase(Path file, boolean selectedOnly, Charset encoding, SaveType saveType, SelfContainedSaveOrder saveOrder, @Nullable FileSnapshot expectedState) throws org.jabref.logic.exporter.SaveException
| |
| saveSelectedAsPlain | back to summary |
|---|---|
| public void saveSelectedAsPlain() | |
| saveWithDifferentEncoding | back to summary |
|---|---|
private @Nullable FileSnapshot saveWithDifferentEncoding(Path file, boolean selectedOnly, Charset encoding, Set<Character> encodingProblems, SaveType saveType, SelfContainedSaveOrder saveOrder, @Nullable FileSnapshot committedState) throws org.jabref.logic.exporter.SaveException
| |
| saveWithoutGitAutoCommit | back to summary |
|---|---|
| public SaveDatabaseAction. Saves the library without triggering the automatic Git commit configured in the library properties. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final SaveDatabaseAction. | |
| public static final SaveDatabaseAction. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static SaveDatabaseAction. | |
| public static SaveDatabaseAction. |
| NORMAL | back to summary |
|---|---|
| public static final SaveDatabaseAction. | |
| SILENT | back to summary |
|---|---|
| public static final SaveDatabaseAction. | |
| SaveDatabaseMode | back to summary |
|---|---|
| private SaveDatabaseMode() | |
| valueOf | back to summary |
|---|---|
| public static SaveDatabaseAction. | |
| values | back to summary |
|---|---|
| public static SaveDatabaseAction. | |
ALREADY_SAVING reports that another thread is writing the very same library: nothing was written by this call,
and the file on disk is not yet the state the user sees.
| Modifier and Type | Field and Description |
|---|---|
| public static final SaveDatabaseAction. | |
| public static final SaveDatabaseAction. | |
| public static final SaveDatabaseAction. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static SaveDatabaseAction. | |
| public static SaveDatabaseAction. |
| ALREADY_SAVING | back to summary |
|---|---|
| public static final SaveDatabaseAction. | |
| FAILURE | back to summary |
|---|---|
| public static final SaveDatabaseAction. | |
| SUCCESS | back to summary |
|---|---|
| public static final SaveDatabaseAction. | |
| SaveResult | back to summary |
|---|---|
| private SaveResult() | |
| valueOf | back to summary |
|---|---|
| public static SaveDatabaseAction. | |
| values | back to summary |
|---|---|
| public static SaveDatabaseAction. | |