Bug 225988 - [api] need API to mark persisted profiles as migrated so they do not continue to be migrated
Summary: [api] need API to mark persisted profiles as migrated so they do not continue...
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.0 M6   Edit
Assignee: David Dykstal CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2008-04-07 11:51 EDT by David Dykstal CLA
Modified: 2008-04-08 05:48 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Dykstal CLA 2008-04-07 11:51:42 EDT
To finish up the migration API for profiles we need to be able to tell a persistence provider to mark a profile as migrated. Profiles that have been migrated are not processed by the persistence provider.
Comment 1 David Dykstal CLA 2008-04-07 22:44:55 EDT
API changes/additions:

New interface: IRSECoreStatusCodes - constants for constructing IStatus values in core.
IRSEPersistenceManager
added public IStatus migrateProfile(ISystemProfile profile, IRSEPersistenceProvider persistenceProvider, boolean delete);

IRSEPersistenceProvider added the following:
	/**
	 * Sets the migration state of a profile.
	 * @param profileName the name of the profile of which to set the migration state 
	 * @param migrated true if the profile is to be marked as migrated, false if it is to be marked as normal.
	 * Normal profiles are returned in {@link #getSavedProfileNames()}, migrated profiles are returned
	 * in {@link #getMigratedProfileNames()}.
	 * @return a status representing the resulting state of the migration. An OK status 
	 * indicates a successful marking. An ERROR status indicates an unsuccessful marking.
	 * @see IRSECoreStatusCodes
	 * @since org.eclipse.rse.core 3.0
	 */
	public IStatus setMigrationMark(String profileName, boolean migrated);
	
	/**
	 * @return The names of the profiles that have been migrated by this persistence provider.
	 * The names of profiles that have been marked as migrated are returned in this list.
	 * The appearance of a profile name in this list implies that the profile may be 
	 * unmigrated by this provider by using {@link #setMigrationMark(String, boolean)}.
	 * This may be an empty array but will never be null.
	 * @since org.eclipse.rse.core 3.0
	 */
	public String[] getMigratedProfileNames();
	
	/**
	 * Indicates whether or not this persistence provider supports migration.
	 * @return true if the provider supports marking of the persistence form of profiles
	 * as migrated, false otherwise.
	 * @since org.eclipse.rse.core 3.0
	 */
	public boolean supportsMigration();
Comment 2 Martin Oberhuber CLA 2008-04-08 05:48:22 EDT
Fix looks good to me.
You'll want to mark interface RSEStatusCodes as @noimplement.