Interface ContentFragment
-
- All Superinterfaces:
ComponentExporter
,ContainerExporter
,DAMContentFragment
public interface ContentFragment extends DAMContentFragment, ContainerExporter
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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.adobe.cq.wcm.core.components.models.contentfragment.DAMContentFragment
DAMContentFragment.DAMContentElement
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PN_DISPLAY_MODE
Name of the required property that stores whether a single text element (singleText
) or multiple elements (multi
) are displayed.static java.lang.String
PN_ELEMENT_NAMES
Name of the optional resource property that stores the names of the elements to be used.static java.lang.String
PN_PATH
Name of the mandatory resource property that stores the path to a content fragment.static java.lang.String
PN_VARIATION_NAME
Name of the optional resource property that stores the name of the variation to be used.-
Fields inherited from interface com.adobe.cq.wcm.core.components.models.contentfragment.DAMContentFragment
JSON_PN_ELEMENTS, JSON_PN_ELEMENTS_ORDER, JSON_PN_MODEL
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description 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.lang.String
getExportedType()
Returns the type of the resource for which the export is performed.default @NotNull java.lang.String
getGridResourceType()
Returns resource type that is used for the internal responsive grid.default @Nullable java.lang.String[]
getParagraphs()
Returns the paragraphs of a multiline text element.-
Methods inherited from interface com.adobe.cq.wcm.core.components.models.contentfragment.DAMContentFragment
getAssociatedContent, getDescription, getEditorJSON, getElements, getExportedElements, getExportedElementsOrder, getName, getTitle, getType
-
-
-
-
Field Detail
-
PN_PATH
static final java.lang.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:
- Constant Field Values
-
PN_ELEMENT_NAMES
static final java.lang.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:
- Constant Field Values
-
PN_VARIATION_NAME
static final java.lang.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:
- Constant Field Values
-
PN_DISPLAY_MODE
static final java.lang.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:
- Constant Field Values
-
-
Method Detail
-
getGridResourceType
@NotNull default @NotNull java.lang.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 java.util.Map<java.lang.String,? extends ComponentExporter> getExportedItems()
Returns the map of all exported child items (resource names from Sling Model classes).- Specified by:
getExportedItems
in interfaceContainerExporter
- Returns:
- the map of all exported child items
- Since:
- com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
- See Also:
ComponentExporter.getExportedType()
-
getExportedItemsOrder
@NotNull default @NotNull java.lang.String[] getExportedItemsOrder()
Returns the order of items in the map.- 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.contentfragment 1.0.0
-
getExportedType
@NotNull default @NotNull java.lang.String getExportedType()
Returns the type of the resource for which the export is performed.- Specified by:
getExportedType
in interfaceComponentExporter
- Specified by:
getExportedType
in interfaceDAMContentFragment
- Returns:
- the type of the resource
- Since:
- com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
-
getParagraphs
@Nullable default @Nullable java.lang.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
-
-