Interface ContainerExporter

All Superinterfaces:
ComponentExporter
All Known Subinterfaces:
Accordion, Carousel, Container, Container, ContentFragment, ExperienceFragment, LayoutContainer, Page, Page, PanelContainer, ResponsiveGridExporter, Tabs
All Known Implementing Classes:
ResponsiveGrid

@ConsumerType public interface ContainerExporter extends ComponentExporter
Defines the JSON export of a container component.

This interface is aimed at being implemented by Sling Model classes corresponding to container components (page, responsive grid, parsys, etc.).

NOTE: Getter methods' names are all prefixed to avoid name conflicts with methods from the implementation class.

  • Method Details

    • getExportedItems

      @Nonnull Map<String,? extends ComponentExporter> getExportedItems()

      Returns the map of all exported child items (resource names from Sling Model classes).

      NOTE: Methods whose JSON serialization would lead to the same JSON property name (":items") will not be serialized.

      Returns:
      the map of all exported child items
      See Also:
    • getExportedItemsOrder

      @Nonnull String[] getExportedItemsOrder()

      Returns the order of items in the map.

      NOTE: This information is required because the JSON specification and most implementations don't provide a stable order of items in JSON objects. Methods whose JSON serialization would lead to the same JSON property name (":order") will not be serialized.

      Returns:
      the order of the items in the map; the array can be empty if the item order is not provided by the underlying persistence layer