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 Details

    • preferences

      CAPreferences preferences()
      Returns:
      The current preferences
    • save

      void save(CAPreferences newPreferences) throws IOException
      Save preferences to persistent storage.
      Parameters:
      newPreferences - The new preferences
      Throws:
      IOException - On I/O errors
    • update

      default void update(Function<CAPreferences,CAPreferences> updater) throws IOException
      Update the current preferences.
      Parameters:
      updater - The updater function
      Throws:
      IOException - On I/O errors
    • addRecentFile

      default Path addRecentFile(Path file) throws IOException
      Add a recent file to the current preferences.
      Parameters:
      file - The file
      Returns:
      file
      Throws:
      IOException - On I/O errors