com.mindtree.techworks.insight.preferences.xmlpersistence
Class XMLDOMPreferenceDataWriter

java.lang.Object
  extended by com.mindtree.techworks.insight.preferences.xmlpersistence.XMLDOMPreferenceDataWriter
All Implemented Interfaces:
PreferenceXMLNameConstants

public class XMLDOMPreferenceDataWriter
extends java.lang.Object
implements PreferenceXMLNameConstants

This class saves the preferences into the preference file. No new top-level preferences can be added, however child preferences and preference attributes can be added to existing preferences. This implementation creates a DOM model of the preferences, and stores the model.

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

Field Summary
 
Fields inherited from interface com.mindtree.techworks.insight.preferences.xmlpersistence.PreferenceXMLNameConstants
DEFAULT_NAMESPACE, TRUE, XMLNAME_INSIGHT_PREFERENCE, XMLNAME_LIST_PREFERENCE_ATTRIBUTE, XMLNAME_PREF_ATT_DEFAULT_VALUE, XMLNAME_PREF_ATT_ENCRYPTED, XMLNAME_PREF_ATT_OPTION_VAL, XMLNAME_PREF_ATT_OPTIONS, XMLNAME_PREF_ATT_PERSISTANT, XMLNAME_PREF_ATT_TYPE, XMLNAME_PREF_ATT_USER_MOD, XMLNAME_PREF_ATT_VALUE, XMLNAME_PREFERENCE, XMLNAME_PREFERENCE_ATT_ID, XMLNAME_PREFERENCE_ATT_NAME, XMLNAME_PREFERENCE_ATTRIBUTE, XMLNAME_PREFERENCE_DISPLAY_CLASS, XMLNAME_PREFERENCE_ID, XMLNAME_PREFERENCE_ISAGGREGATED, XMLNAME_PREFERENCE_ISUSERMOD, XMLNAME_PREFERENCE_NAME, XMLNAME_XSI_TYPE, XSI_NAMESPACE
 
Constructor Summary
XMLDOMPreferenceDataWriter(java.lang.String preferenceFile)
          Default Constructor which gets the list of preferences to store.
 
Method Summary
 void writePreferences(java.util.List preferences, java.lang.String outputFile)
          Writes the preferences to the store
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLDOMPreferenceDataWriter

public XMLDOMPreferenceDataWriter(java.lang.String preferenceFile)
Default Constructor which gets the list of preferences to store.

Parameters:
preferenceFile - The preferenceFile to store.
Method Detail

writePreferences

public void writePreferences(java.util.List preferences,
                             java.lang.String outputFile)
                      throws PreferenceHandlerStoreException
Writes the preferences to the store

Parameters:
preferences - The list of preferences to store
outputFile - The filt to which the preferences are to be stored
Throws:
PreferenceHandlerStoreException - If the preference cannot be stored.


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