Class DeploymentMigrationUtil
java.lang.Object
de.hybris.platform.util.migration.DeploymentMigrationUtil
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 Summary
Modifier and TypeMethodDescriptionstatic voidmigrateDeploymentManually(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.static voidmigrateDeployments(String migrationExtensionName) Migrates the deployments of a extension by updating the ydeployments entry and altering table if needed.static voidmigrateGeneralizedDuplicatedDeployments(String migrationExtensionName, String... deploymentNames) Method will only migrate a duplicated deployments for given deployment names.static voidmigrateSelectedDeployments(String migrationExtensionName, String... typeCodes) Uses an EJB layer to avoid a jalo layer caching
-
Method Details
-
migrateDeployments
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 themigrateDeploymentManually(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 byPersistenceManager.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
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 deploymentoldTableName- table name of deployment prior change
-
migrateSelectedDeployments
Uses an EJB layer to avoid a jalo layer caching
-