Klasse SettingsFragment

java.lang.Object
org.obrel.core.RelatedObject
org.obrel.core.SerializableRelatedObject
Alle implementierten Schnittstellen:
de.esoco.lib.manage.Initializable, Serializable, org.obrel.core.Relatable

public abstract class SettingsFragment extends InteractionFragment
A base class for fragments that edit the user settings that can be obtained through the method ProcessFragment.getUserSettings(boolean).
Siehe auch:
  • Konstruktordetails

    • SettingsFragment

      public SettingsFragment()
  • Methodendetails

    • applySettings

      public void applySettings(Entity user, Collection<org.obrel.core.RelationType<?>> settingTypes, boolean store) throws de.esoco.storage.StorageException, de.esoco.lib.manage.TransactionException
      Applies the edited values of certain settings by transferring them from the corresponding process parameters to the user's settings and optionally storing the settings. If no settings object exists for the user it will be created.
      Parameter:
      user - The user to apply the settings to
      settingTypes - The settings relation types
      store - TRUE to store the user settings after applying
      Löst aus:
      de.esoco.storage.StorageException - If updating a settings extra attribute fails
      de.esoco.lib.manage.TransactionException - If creating or storing the user settings fails
    • collectSettings

      public void collectSettings(Entity user, Collection<org.obrel.core.RelationType<?>> settingTypes) throws de.esoco.storage.StorageException
      Collects certain settings by transferring them from the user's settings to the corresponding process parameters.
      Parameter:
      user - The user to collect the settings from
      settingTypes - The settings relation types
      Löst aus:
      de.esoco.storage.StorageException - If accessing a settings extra attribute fails
    • setParameterFromPreference

      protected <T> void setParameterFromPreference(Configuration settings, org.obrel.core.RelationType<T> preference) throws de.esoco.storage.StorageException
      Type-safe method to set a preferences parameter from a settings configuration if it exists.
      Parameter:
      settings - The settings (can be NULL if no settings are available)
      preference - The preference extra attribute
      Löst aus:
      de.esoco.storage.StorageException - If reading the preference value fails
    • setPreferenceFromParameter

      protected <T> void setPreferenceFromParameter(Configuration settings, org.obrel.core.RelationType<T> preference) throws de.esoco.storage.StorageException
      Type-safe method to set a preferences parameter from a settings configuration.
      Parameter:
      settings - The settings
      preference - The preference extra attribute
      Löst aus:
      de.esoco.storage.StorageException - If reading the preference value fails