Upgrading a Legacy App

If you have an app that was made configurable under an earlier version of Liferay DXP, you can upgrade without having to reconfigure any of your app’s instances.

If you have an app that was configurable using the mechanisms of Liferay Portal 6.2 and before, refer to Transitioning from Portlet Preferences to the Configuration API.

If you have an app with a configuration interface scoped to anything other than SYSTEM and a custom UI for saving configuration values to PortletPreferences, you have two options:

  • Keep using your custom UI. Deactivate the auto-generated UI in Instance Settings by setting the scope in your configuration interface to SYSTEM. This is quick and easy, but won’t make your code easier to maintain in the long term.

    For other ways to disable the auto-generated UI, see Excluding a Configuration UI

  • Write an Upgrade Process to convert your configuration values in PortletPreferences to an instance-scoped OSGi configuration, using the saveCompanyConfiguration method in the ConfigurationProvider interface.

Then remove your custom UI. If you’re reading configuration values using ConfigurationProvider’s getCompanyConfiguration method, the auto-generated UI picks up where you left off, with no need to reconfigure anything.

« Using DDM Form Annotations in Configuration FormsDynamically Populating Select List Fields in the Configuration UI »
Was this article helpful?
0 out of 0 found this helpful