Class ContactSortNameUpgradePlugin

java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.commons.upgrade.UpgradeProductPlugin
org.exoplatform.upgrade.ContactSortNameUpgradePlugin
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin

public class ContactSortNameUpgradePlugin extends org.exoplatform.commons.upgrade.UpgradeProductPlugin
Refiles the email contacts that carry no structured names: their stored sort key used to be the display name as typed ("JOHN DOE", under J) and now follows the contact form's reading of it ("DOE JOHN", under D). The key is derived once at write time, so rows written before the change keep the old key until recomputed. The recomputation itself lives in the email connector's contact service; this plugin only triggers it once. The service is a Spring bean of the connector's context, resolved when the plugin runs and after the server has finished starting: taken in the constructor, the Kernel would create it, and its persistence graph, while that context is still starting. The plugin is registered under the connector's profile and asynchronous: the wait for the server startup is refused on the startup thread, and the asynchronous path of the upgrade framework binds the container itself.
  • Field Summary

    Fields inherited from class org.exoplatform.commons.upgrade.UpgradeProductPlugin

    asyncUpgradeExecution, executeOnlyOnce, OLD_PRODUCT_GROUP_ID, oldProductGroupId, PRODUCT_GROUP_ID, productGroupId, targetVersion, UPGRADE_COMPLETED_STATUS, UPGRADE_PLUGIN_ASYNC, UPGRADE_PLUGIN_ENABLE, UPGRADE_PLUGIN_EXECUTE_ONCE_PARAMETER, UPGRADE_PLUGIN_EXECUTION_ORDER, UPGRADE_PLUGIN_TARGET_PARAMETER

    Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin

    desc, name
  • Constructor Summary

    Constructors
    Constructor
    Description
    ContactSortNameUpgradePlugin(org.exoplatform.container.xml.InitParams initParams)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    processUpgrade(String oldVersion, String newVersion)
     

    Methods inherited from class org.exoplatform.commons.upgrade.UpgradeProductPlugin

    afterUpgrade, beforeUpgrade, equals, getPluginExecutionOrder, getProductGroupId, getTargetVersion, getValue, hashCode, isAsyncUpgradeExecution, isEnabled, isExecuteOnlyOnce, shouldProceedToUpgrade, shouldProceedToUpgrade, storeValueForPlugin

    Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin

    getDescription, getName, setDescription, setName

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ContactSortNameUpgradePlugin

      public ContactSortNameUpgradePlugin(org.exoplatform.container.xml.InitParams initParams)
  • Method Details

    • processUpgrade

      public void processUpgrade(String oldVersion, String newVersion)
      Specified by:
      processUpgrade in class org.exoplatform.commons.upgrade.UpgradeProductPlugin