Interface ContentFragment

All Superinterfaces:
Component, ComponentExporter, ContainerExporter, DAMContentFragment

public interface ContentFragment extends DAMContentFragment, ContainerExporter, Component
Defines the Sling model for the /apps/core/wcm/components/contentfragment component. The model provides information about the referenced content fragment and access to representations of its elements.
Since:
com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
  • Field Details

    • PN_PATH

      static final String PN_PATH
      Name of the mandatory resource property that stores the path to a content fragment.
      Since:
      com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
      See Also:
    • PN_ELEMENT_NAMES

      static final String PN_ELEMENT_NAMES
      Name of the optional resource property that stores the names of the elements to be used.
      Since:
      com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
      See Also:
    • PN_VARIATION_NAME

      static final String PN_VARIATION_NAME
      Name of the optional resource property that stores the name of the variation to be used.
      Since:
      com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
      See Also:
    • PN_DISPLAY_MODE

      static final String PN_DISPLAY_MODE
      Name of the required property that stores whether a single text element (singleText) or multiple elements (multi) are displayed.
      Since:
      com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
      See Also:
  • Method Details

    • getGridResourceType

      @NotNull default @NotNull String getGridResourceType()
      Returns resource type that is used for the internal responsive grid.
      Returns:
      resource type
      Since:
      com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
    • getExportedItems

      @NotNull default @NotNull Map<String,? extends ComponentExporter> getExportedItems()
      Returns the map of all exported child items (resource names from Sling Model classes).
      Specified by:
      getExportedItems in interface ContainerExporter
      Returns:
      the map of all exported child items
      Since:
      com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
      See Also:
    • getExportedItemsOrder

      @NotNull default @NotNull String[] getExportedItemsOrder()
      Returns the order of items in the map.
      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.contentfragment 1.0.0
    • getExportedType

      @NotNull default @NotNull String getExportedType()
      Returns the type of the resource for which the export is performed.
      Specified by:
      getExportedType in interface Component
      Specified by:
      getExportedType in interface ComponentExporter
      Specified by:
      getExportedType in interface DAMContentFragment
      Returns:
      the type of the resource
      Since:
      com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
      See Also:
    • getParagraphs

      @Nullable default @Nullable String[] getParagraphs()
      Returns the paragraphs of a multiline text element.
      Returns:
      an array containing HTML paragraphs or null for non-multiline-text elements
      Since:
      com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0