Interface Container

All Superinterfaces:
Component, ComponentExporter, ContainerExporter
All Known Subinterfaces:
Accordion, Carousel, LayoutContainer, PanelContainer, Tabs

@ConsumerType public interface Container extends Component, ContainerExporter
A base interface to be extended by all containers. A container is a component that provides access to child resources. If the container contains panels, such as the Carousel, Tabs and Accordion models, then the PanelContainer class should be used instead.
Since:
com.adobe.cq.wcm.core.components.models 12.5.0
  • Field Details

    • PN_BACKGROUND_IMAGE_ENABLED

      static final String PN_BACKGROUND_IMAGE_ENABLED
      Name of the configuration policy property that indicates if background images are enabled
      Since:
      com.adobe.cq.wcm.core.components.models 12.8.0
      See Also:
    • PN_BACKGROUND_COLOR_ENABLED

      static final String PN_BACKGROUND_COLOR_ENABLED
      Name of the configuration policy property that indicates if background colors are enabled
      Since:
      com.adobe.cq.wcm.core.components.models 12.8.0
      See Also:
    • PN_BACKGROUND_COLOR_SWATCHES_ONLY

      static final String PN_BACKGROUND_COLOR_SWATCHES_ONLY
      Name of the configuration policy property that indicates if background colors are to be restricted to predefined values
      Since:
      com.adobe.cq.wcm.core.components.models 12.8.0
      See Also:
    • PN_BACKGROUND_IMAGE_REFERENCE

      static final String PN_BACKGROUND_IMAGE_REFERENCE
      Name of the resource property that indicates that path to the background image
      Since:
      com.adobe.cq.wcm.core.components.models 12.8.0
      See Also:
    • PN_BACKGROUND_COLOR

      static final String PN_BACKGROUND_COLOR
      Name of the resource property that indicates the background color
      Since:
      com.adobe.cq.wcm.core.components.models 12.8.0
      See Also:
  • Method Details

    • getItems

      @NotNull @Deprecated default @NotNull List<ListItem> getItems()
      Deprecated.
      since 12.17.0 - use getChildren()
      Returns a list of container items
      Returns:
      List of container items
      Since:
      com.adobe.cq.wcm.core.components.models 12.5.0
    • getChildren

      @NotNull default @NotNull List<? extends ContainerItem> getChildren()
      Returns a list of container items.
      Returns:
      List of container items.
      Since:
      com.adobe.cq.wcm.core.components.models 12.17.0
    • getBackgroundStyle

      @Nullable default @Nullable String getBackgroundStyle()
      Returns the background CSS style to be applied to the component's root element
      Returns:
      CSS style string for the component's root element
      Since:
      com.adobe.cq.wcm.core.components.models 12.8.0
    • getExportedItems

      @NotNull default @NotNull Map<String,? extends ComponentExporter> getExportedItems()
      Description copied from interface: ContainerExporter

      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.

      Specified by:
      getExportedItems in interface ContainerExporter
      Returns:
      the map of all exported child items
      Since:
      com.adobe.cq.wcm.core.components.models 12.5.0
      See Also:
    • getExportedItemsOrder

      @NotNull default @NotNull String[] getExportedItemsOrder()
      Description copied from interface: ContainerExporter

      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.

      Specified by:
      getExportedItemsOrder in interface ContainerExporter
      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
      Since:
      com.adobe.cq.wcm.core.components.models 12.5.0
      See Also: