Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.perspective.model
Class PropertiesModelMigration

java.lang.Object
  extended by com.ibm.etools.iseries.perspective.model.PropertiesModelMigration

public class PropertiesModelMigration
extends Object

Migrate the properties model for the current project from the old model which used custom .xml files to the new model which uses .properties files


Field Summary
static String OLD_METADATA_ARCHIVE
           
 
Constructor Summary
PropertiesModelMigration()
           
 
Method Summary
static QualifiedName getQualifiedName(String key)
          Convert a string with that might be have a qualifier prefix into a QualifiedName.
static QualifiedName mapToNewPropertiesKeys(IBMiPropertiesType type, String key)
           
static IStatus migratePropertiesModel(IProject project, IProgressMonitor monitor)
          Finds all of the old properties model within the given project and migrates them to the new properties model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OLD_METADATA_ARCHIVE

public static final String OLD_METADATA_ARCHIVE
See Also:
Constant Field Values
Constructor Detail

PropertiesModelMigration

public PropertiesModelMigration()
Method Detail

migratePropertiesModel

public static IStatus migratePropertiesModel(IProject project,
                                             IProgressMonitor monitor)
Finds all of the old properties model within the given project and migrates them to the new properties model. If successful, the old properties files are cleaned up. If no successful the new properties files are cleaned up. If there are no old properties model files, then nothing is done.

Parameters:
project - - the IProject whose properties files will be migrated
monitor - - the IProgressMonitor keeps track of the progress of the operation. This method will abort and clean up if the monitor is canceled. The monitor will not even get started if this is not an iProject or it is already migrated.
Returns:

getQualifiedName

public static QualifiedName getQualifiedName(String key)
Convert a string with that might be have a qualifier prefix into a QualifiedName. If it is not qualified then use the current project name as a qualifier.

Parameters:
key -
Returns:
the QualifiedName equivalent of the given key

mapToNewPropertiesKeys

public static QualifiedName mapToNewPropertiesKeys(IBMiPropertiesType type,
                                                   String key)

Rational Developer for Power Systems Software
V7.6

Copyright 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.