org.rhq.enterprise.communications.util.prefs
Class PreferencesUpgradeStep

java.lang.Object
  extended by org.rhq.enterprise.communications.util.prefs.PreferencesUpgradeStep

public abstract class PreferencesUpgradeStep
extends Object

This object upgrades a set of preferences to a particular configuration schema version. Implementations only need to upgrade a single version step - that is to say, if an upgrade step upgrades to the configuration schema version of "5", it need only worry about upgrading preferences that are already at the version level of "4"

Author:
John Mazzitelli

Constructor Summary
PreferencesUpgradeStep()
           
 
Method Summary
abstract  int getSupportedConfigurationSchemaVersion()
          Returns the configuration schema version that this upgrade step supports; that is to say, this upgrade step object will upgrade a set of preferences to the version returned by this method.
abstract  void upgrade(Preferences preferences)
          Upgrades the given set of preferences to the supported configuration schema version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreferencesUpgradeStep

public PreferencesUpgradeStep()
Method Detail

getSupportedConfigurationSchemaVersion

public abstract int getSupportedConfigurationSchemaVersion()
Returns the configuration schema version that this upgrade step supports; that is to say, this upgrade step object will upgrade a set of preferences to the version returned by this method.

Returns:
the version that this object will upgrade a set of preferences to

upgrade

public abstract void upgrade(Preferences preferences)
Upgrades the given set of preferences to the supported configuration schema version.

Parameters:
preferences - the preferences to upgrade


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.