Interface CAPreferencesServiceType
- All Superinterfaces:
com.io7m.repetoir.core.RPServiceType
- All Known Implementing Classes:
CAPreferencesService
public interface CAPreferencesServiceType
extends com.io7m.repetoir.core.RPServiceType
The preferences service.
-
Method Summary
Modifier and TypeMethodDescriptiondefault PathaddRecentFile(Path file) Add a recent file to the current preferences.voidsave(CAPreferences newPreferences) Save preferences to persistent storage.default voidupdate(Function<CAPreferences, CAPreferences> updater) Update the current preferences.Methods inherited from interface com.io7m.repetoir.core.RPServiceType
description
-
Method Details
-
preferences
CAPreferences preferences()- Returns:
- The current preferences
-
save
Save preferences to persistent storage.- Parameters:
newPreferences- The new preferences- Throws:
IOException- On I/O errors
-
update
Update the current preferences.- Parameters:
updater- The updater function- Throws:
IOException- On I/O errors
-
addRecentFile
Add a recent file to the current preferences.- Parameters:
file- The file- Returns:
file- Throws:
IOException- On I/O errors
-