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 theCarousel
,Tabs
andAccordion
models, then thePanelContainer
class should be used instead.- Since:
- com.adobe.cq.wcm.core.components.models 12.5.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PN_BACKGROUND_COLOR
Name of the resource property that indicates the background colorstatic java.lang.String
PN_BACKGROUND_COLOR_ENABLED
Name of the configuration policy property that indicates if background colors are enabledstatic java.lang.String
PN_BACKGROUND_COLOR_SWATCHES_ONLY
Name of the configuration policy property that indicates if background colors are to be restricted to predefined valuesstatic java.lang.String
PN_BACKGROUND_IMAGE_ENABLED
Name of the configuration policy property that indicates if background images are enabledstatic java.lang.String
PN_BACKGROUND_IMAGE_REFERENCE
Name of the resource property that indicates that path to the background image
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default @Nullable java.lang.String
getBackgroundStyle()
Returns the background CSS style to be applied to the component's root elementdefault @NotNull java.util.List<? extends ContainerItem>
getChildren()
Returns a list of container items.default @NotNull java.util.Map<java.lang.String,? extends ComponentExporter>
getExportedItems()
Returns the map of all exported child items (resource names from Sling Model classes).default @NotNull java.lang.String[]
getExportedItemsOrder()
Returns the order of items in the map.default @NotNull java.util.List<ListItem>
getItems()
Deprecated.since 12.17.0 - usegetChildren()
-
Methods inherited from interface com.adobe.cq.wcm.core.components.models.Component
getAppliedCssClasses, getData, getExportedType, getId
-
-
-
-
Field Detail
-
PN_BACKGROUND_IMAGE_ENABLED
static final java.lang.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:
- Constant Field Values
-
PN_BACKGROUND_COLOR_ENABLED
static final java.lang.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:
- Constant Field Values
-
PN_BACKGROUND_COLOR_SWATCHES_ONLY
static final java.lang.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:
- Constant Field Values
-
PN_BACKGROUND_IMAGE_REFERENCE
static final java.lang.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:
- Constant Field Values
-
PN_BACKGROUND_COLOR
static final java.lang.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:
- Constant Field Values
-
-
Method Detail
-
getItems
@NotNull @Deprecated default @NotNull java.util.List<ListItem> getItems()
Deprecated.since 12.17.0 - usegetChildren()
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 java.util.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 java.lang.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 java.util.Map<java.lang.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 interfaceContainerExporter
- Returns:
- the map of all exported child items
- Since:
- com.adobe.cq.wcm.core.components.models 12.5.0
- See Also:
ContainerExporter.getExportedItems()
-
getExportedItemsOrder
@NotNull default @NotNull java.lang.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 interfaceContainerExporter
- 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:
ContainerExporter.getExportedItemsOrder()
-
-