org.eclipse.emf.emfstore.internal.server.startup
Class ServerHrefMigrator

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.server.startup.ServerHrefMigrator
Direct Known Subclasses:
ClientHrefMigrator

public class ServerHrefMigrator
extends Object

When using the default EMF XMI persistence HRefs between resources are persisted based on the non-normalized URIs of the resources. Since version 1.1 introduced a new URI scheme for EMFStore, files that were persisted with version 1.0 and prior need to be migrated.

This migrator will update the HRefs in legacy files on the server side.

Author:
jfaltermeier

Constructor Summary
ServerHrefMigrator()
           
 
Method Summary
 List<String> getCorruptProjectIds()
          Returns a list of project IDs that could not be migrated.
 boolean migrate()
          Performs the migration, if needed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerHrefMigrator

public ServerHrefMigrator()
Method Detail

migrate

public boolean migrate()
Performs the migration, if needed. Creates a backup beforehand.

Returns:
true if migration was successful, false if an error occurred and the server startup should be canceled.

getCorruptProjectIds

public List<String> getCorruptProjectIds()
Returns a list of project IDs that could not be migrated.

Returns:
the corruptProjectIds


Copyright © 2015. All Rights Reserved.