Class DeploymentMigrationUtil

java.lang.Object
de.hybris.platform.util.migration.DeploymentMigrationUtil

public final class DeploymentMigrationUtil extends Object
Utility class for migrating deployments of an extension. You can use it when changing the deployment name (when migrating from advanced-deployment to items.xml) or changing the table name.

ATTENTION: For usage contact hybris support first. All methods may alter tables!!!!
Since:
3.1-u6
  • Method Details

    • migrateDeployments

      public static void migrateDeployments(String migrationExtensionName)
      Migrates the deployments of a extension by updating the ydeployments entry and altering table if needed. Does only execute something if related types were initialized prior 3.0-u4. If nothing will happen to your deployment because of missing ydeployments entry (type was created prior 3.0-u4) use the migrateDeploymentManually(int, String) method.

      ATTENTION: This method may alter tables!!!!
      Parameters:
      migrationExtensionName - name of the extension the deployments have to be migrated
    • migrateGeneralizedDuplicatedDeployments

      public static void migrateGeneralizedDuplicatedDeployments(String migrationExtensionName, String... deploymentNames)
      Method will only migrate a duplicated deployments for given deployment names. Deployment is being overridden by the type code using the last correctly loaded by PersistenceManager.getItemDeployment(int) - which means that there will be picked a deployment for the preceding extension. If the given composed type is to be a RelationType this type is also recreated upon a new deployment. There is mandatory system update needed after such adjustment.
    • migrateDeploymentManually

      public static void migrateDeploymentManually(int typecode, String oldTableName)
      Migrates a deployment for types added prior 3.0-u4 by checking if there is no ydeployments entry and altering table if needed.

      ATTENTION: This method may alter tables!!!!
      Parameters:
      typecode - typecode of changed deployment
      oldTableName - table name of deployment prior change
    • migrateSelectedDeployments

      public static void migrateSelectedDeployments(String migrationExtensionName, String... typeCodes)
      Uses an EJB layer to avoid a jalo layer caching