com.mindtree.techworks.insight.preferences
Interface PreferenceDataHandler

All Known Implementing Classes:
XMLPreferenceDataHandler

public interface PreferenceDataHandler

This is an interface used by the PreferenceManager for retrieving and storing data into the data-store, which could be an XML file, a properties file or a database. The actual datastore used and format of data depends on the implementation of this interface.

The lowest unit of transfer between the PreferenceManager and a data-store is a Preference.

Version:
$Revision: 27 $ $Date: 2007-12-16 04:58:03 -0700 (Sun, 16 Dec 2007) $
Author:
Bindul Bhowmik
See Also:
PreferenceManager, Preference

Method Summary
 java.util.Collection getAllPreferences()
          Returns all the preferences from the store.
 Preference getPreference(java.lang.String preferenceId)
          Loads a particular Preference using the Preference Id passed.
 java.util.Collection getPreferenceNameList()
          Returns a list of names of all Preferences currently for the instance of Insight from the store.
 void savePreferences(java.util.List preferences)
          Saves the passed preferences to the store.
 

Method Detail

getPreferenceNameList

java.util.Collection getPreferenceNameList()
Returns a list of names of all Preferences currently for the instance of Insight from the store.

Returns:
A collection of Preference Names

getAllPreferences

java.util.Collection getAllPreferences()
Returns all the preferences from the store. The implications of using this method will largely depend on the store, and the Handler implementation.

Returns:
A collection of Preferences

getPreference

Preference getPreference(java.lang.String preferenceId)
Loads a particular Preference using the Preference Id passed.

Parameters:
preferenceId - The id of the Preference to be loaded
Returns:
The preference for the id passed, or null.

savePreferences

void savePreferences(java.util.List preferences)
                     throws PreferenceHandlerStoreException
Saves the passed preferences to the store.

Parameters:
preferences - The Preferences to store.
Throws:
PreferenceHandlerStoreException


Copyright © 2003-2008 MindTree Consulting Ltd.. All Rights Reserved.