Some types of entity, such as web content articles (JournalArticle) and documents (DLFileEntry) provide the ability to dynamically define different "subtypes" each with a different subset of fields. Liferay has traditionally added some methods to multi-purpose frameworks such as the Asset Framework or ClassType to allow developers to declare these different subtypes. However when those frameworks are not really needed, it's very cumbersome to have to implement them just to declare the subtypes.
The goal of this story is to provide a small and single purpose abstraction that allows developers to provide a list of form variations that a specific custom type has. The concept of "form variation" encapsulates in a more precise way what end users might refer as subtype, since the difference among subtypes is precisely that a certain subtype of the entity has a different subset of fields in its form.
This story also includes changing they way field mapping in fragment-based pages works to leverage the new Forms Variation Provider, making it easier for 3rd party developers to expose their subtypes for mapping. Because of this, the following testing is necessary to ensure that the mapping feature works as usual after these changes:
- Display Page Templates
- On creation, it should be possible to select any of the registered types of content (Blogs Entry, Document and Web Content Article out of the box) and their subtypes (for Document and Web Content Article)
- When editing the template, the fields of the selected type and subtype are available for mapping
- Fragment Field Mapping
- When selecting a specific content to map to a fragment editable, the list of fields show the custom fields of the types and subtypes of the content item.
- When using Collection Display fragment, with "Grid" list style and adding fragments to a cell to map them to fields, , the list of fields show the custom fields of the types and subtypes of the content item.
|Test Scenarios||Test Strategy||Kind of test||Is it covered by FrontEnd ? (JS-Unit)||Is it covered by BackEnd ? (unit or integration)||Could it be covered by POSHI?|
|The contributed content types and their subtypes are available when creating a display page template||Critical||Manual||No||No||Yes|
|The associated custom subtypes and ddmfields are available for mapping in display page template||High||Manual||No||Yes||Yes|
|The custom ddmfields of content are available for mapping in editable field||High||Manual||No||No||Yes|
|The custom ddmfields of single type collection items are available for mapping in editable field||High||Manual||No||No||Yes|