Skip to Content
7
Jul 24, 2014 at 06:51 PM

Extending Abstract Item in Hybris 5.1 Results in Abstract Subclass Unless Jalo Class Defined

1576 Views

In a Hybris 5.1.1 project, we've extended an abstract item type ( SimpleCMSComponent ) in both an extension and add-on with a concrete implementation, with "abstract" explicitly set to "false".

An example of the *-items.xml is below:

             <itemtype code="NewWidgetCMSComponent"
                       extends="SimpleCMSComponent"
                       abstract="false"
                       generate="true"
                       autocreate="true">
                 <description>A concrete implementation of SimpleCMSComponent</description>
             </itemtype>

However, after initializing the system, this results in the following

Screenshot of Type Extended attributes

Any custom Item Types that extend concrete hybris-shipped Item Types are not abstract.

When we modify the Item Type definition to include the jaloclass attribute, the Item type is no longer abstract

             <itemtype code="NewWidgetCMSComponent"
                       extends="SimpleCMSComponent"
                       abstract="false"
                       generate="true"
                       jaloclass="com.example.hybris.NewWidgetCMSComponent"
                       autocreate="true">
                 <description>A concrete implementation of SimpleCMSComponent</description>
             </itemtype>

Questions:

  1. Why do we need to explicitly define the jaloclass (but not create it) on concrete implementations of hybris abstract types?

  2. Is this a bug with hybris 5.1.1? Is there a patch for the issue? We did not encounter this issue working with hybris 4.8.x and hybris 5.0.x