Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-32130

Autogenerated Base Services may confuse external developers about what API to use

    Details

    • Type: Bug
    • Status: Verified
    • Resolution: Unresolved
    • Affects Version/s: 6.2.0 CE M4
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Error exists on git id: 470236061cfbab523ec0d508dbeab9280886e651
    • Fix Priority:
      4

      Description

      There are several services in the portal where the Autogenerated methods of the *ServiceBaseImpl.java have a very similar name to the manually implemented services in *ServiceImpl.java but the functionality is completely different.

      This happens in almost every service in Portal. For example, in Document Library we have the following API:

      This following method checks if there are related DDMStructures and is deleting those too and then deletes FileEntryType.

      DLFileEntryTypeLocalServiceImpl.deleteFileEntryType(<fileEntryTypeId | fileEntryType>);
      

      However, this other method DLFileEntryTypeLocalServiceBaseImpl.deleteDLFileEntryType(..) which calls DLFileEntryTypePersistence layer to delete FileEntryType. This might lead data corruption!

      DLFileEntryTypeLocalServiceUtil.deleteDLFileEntryType(<fileEntryTypeId | fileEntryType>);
      

      Then, the developers may be confused because they don't know which API should be called deleteFileEntryType or deleteDLFileEntryType.

        Attachments

          Activity

            People

            • Assignee:
              caorongjin Alexander Chow (Inactive)
              Reporter:
              sampsa.sohlman Sampsa Sohlman (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                7 years, 32 weeks, 1 day ago

                Packages

                Version Package