Upgrade 6.1 plugins to 6.2
List of API changes that affect plugins developed on previous versions of Liferay
Control Panel Entry #
If a customer portlet you have developed had a ControlPanelEntry to control its visibility within the Control Panel, it is strongly recommended that you adapt it to the new APIs. The old APIs are still available to allow compatibility of the same plugin across 6.1 and 6.2, but won't be used when running in 6.2.
For 6.2 it is recommended that your class inherits DefaultControlPanelEntry and the override one of the following two methods:
- hasAccessPermissionDenied: Override this method if you want to deny access to this application within the control panel to the current user for whatever reason. Some common reason is that he doesn't have some special rights that are necessary, that the application has been disable in an special way or that the current context (usually determined by the Group object) does not support execution of this portlet.
- hasAccessPermissionExplicitlyGranted: Override this method if you want to allow access to this portlet within the control panel for the current user even if he does not have an explict "Access in Control Panel" permission for it. An example of this is the "Sites" portlet which is shown to anyone that belongs to a site. Or the "Users & Organizations" portlet which is shown to organization administrators automatically.
The keys used for structures are now trimmed and uppercases automatically within the service implementation. An upgrade process has been written to apply this rule to all existing keys in the database.
For more information seee LPS-31200 DDMStructure StructureKeys need to be trimed and uppercased
Journal API #
Journal now uses DDM to handle structures and templates. Because of that invocations to JournalTemplate and JournalStructure will need to be changed to DDMTemplate and DDMStructure respectively. Note that DDM uses the newer pattern with respect with ids. That means that the db primary keys are longs and are called templateId and structureIds. There are also string based unique identifiers, which are useful when creating programmatically, but they are called templateKey and structureKey. You should change your API calls to accommodate this naming changes.
Document Library API #
Changed DLApp service to make sure no method requires a mandatory parameter within the serviceContext object
- This changes the API for DLAppService and DLAppLocalService.
- The method moveFileEntry() was previously dependent on the serviceContext.scopeGroupId when the newFolderId was 0 (the default parent folder ID). The code has been changed where the groupId would be obtained from the FileEntry (as specified by the fileEntryId) if the newFolderId was 0.
- For updateFolder(), an extra parameter is added for the groupId since the root folder can be updated for purposes of configuring the Document Types specified for that root folder.
For more information see LPS-31970 (DL API to move file includes mandatory field in serviceContext)