net.sf.sfac.setting
Interface ProfilesClient
public interface ProfilesClient
Interface provided by objects using profiles.
The profile client must:
- Provide a global Settings object that will contain the profiles (as a SubSettingList).
- Provide a currentSubSettings object (which is usually a SubSettingsProxy of the global settings) that contains the values
that are "profiled".
The currentSubSettings must be used by all the objects wanting to see the "profile" data. Then you can use a ProfileController in
your application to manage profiles. The profiles are copies of the currentSubSettings that can be saved and restored.
To create and 'save' a profile, the controller:
- calls getCurrentSubSettings() to have the settings to save. At this stage all objects using this settings must have correctly
stored the value they want to persist in this settings.
- Make a copy of is and 'store' it in a SubSettingList inside the global settings.
To restore a profile, the controller:
- Author:
- Olivier Berlanger
getGlobalSettings
Settings getGlobalSettings()
getCurrentSubSettings
Settings getCurrentSubSettings()
updateCurrentSubSettings
void updateCurrentSubSettings(Settings profile)
Copyright © 2012. All Rights Reserved.