Interface IPluginSettingsHandler<T>

Type Parameters:
T - The type of the configuration (a class modeling the data to handle)

public interface IPluginSettingsHandler<T>
Allows for reading, modifying and saving config data for a plugin in the underlying database. No low-level access details involved.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a deep clone copy of the configuration: If the object returned by this call is modified and save() is called, no changes will be reflected.
    void
    Persists the data to the database.
    void
    setSettings(T settings)
    Sets the configuration.
  • Method Details

    • save

      void save() throws Exception
      Persists the data to the database. More specifically, the value already set via method setSettings(Object).
      Throws:
      Exception - When there was an unexpected problem saving.
    • getSettings

      T getSettings()
      Returns a deep clone copy of the configuration: If the object returned by this call is modified and save() is called, no changes will be reflected. Use setSettings(Object) beforehand
      Returns:
    • setSettings

      void setSettings(T settings)
      Sets the configuration. This only alters the in-memory copy of the runtime configuration of the app. To make it persistent, call save().
      Parameters:
      settings - Data object.