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

As a developer I can declare capabilities of my custom entity



      Currently, there are some features, such as Display Page Templates, that provide support for custom entities. Up until now, in order to determine whether a specific entity is supported, the display page templates code checks for an implementation of a specific service, such as InfoItemFormProvider. However this method has two limitations:

      • Some features require more than one service to work, so just looking for one is not enough. And writing code to look for all would be tedious.
      • In some cases 3rd party developers may provide implementations for all required services, but they do not want their custom entities to be shown as supporting a given feature. Instead they have implemented them to support some other feature (since the info framework services are becoming more and more reusable). An example of this is AssetEntry, which provides an InfoItemFormProvider, but it's not desired to show it as an option when creating a Display Page Template.

      The goal of this story is to let developers explicitly declare that a certain feature, or in more generic terms, a capability is desired for a given custom entity. This will be doable with a new service called Capabilities Provider (InfoItemCapabilitiesProvider to be precise). InfoItemServiceTracker will also be expanded with a new method that allows consumer developers to easily find out which custom entities support a certain capabilities. Capabilities will also be extensible by 3rd parties, by implementing an interface called InfoItemCapability.

      Finally, to keep backwards compatibility with Liferay 7.2, all implementations of InfoDisplayContributor will be assumed to declare support for Display Page Templates, since that's the capability for which these implementations were used for.


          Issue Links



              manoel.cyreno Manoel Cyreno
              jorge.ferrer Jorge Ferrer
              Engineering Assignee:
              SE Support
              Recent user:
              Kiyoshi Lee
              Participants of an Issue:
              0 Vote for this issue
              0 Start watching this issue




                  Version Package