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
-
-
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 String
PN_DISPLAY_MODE
Name of the required property that stores whether a single text element (singleText
) or multiple elements (multi
) are displayed.static String
PN_ELEMENT_NAMES
Name of the optional resource property that stores the names of the elements to be used.static String
PN_PATH
Name of the mandatory resource property that stores the path to a content fragment.static 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 Map<String,? extends ComponentExporter>
getExportedItems()
Returns the map of all exported child items (resource names from Sling Model classes).default @NotNull String[]
getExportedItemsOrder()
Returns the order of items in the map.default @NotNull String
getExportedType()
Returns the type of the resource for which the export is performed.default @NotNull String
getGridResourceType()
Returns resource type that is used for the internal responsive grid.default @Nullable String[]
getParagraphs()
Returns the paragraphs of a multiline text element.-
Methods inherited from interface com.adobe.cq.wcm.core.components.models.Component
getAppliedCssClasses, getData, getId
-
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 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 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 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 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 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 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 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 String getExportedType()
Returns the type of the resource for which the export is performed.- Specified by:
getExportedType
in interfaceComponent
- 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
- See Also:
ComponentExporter.getExportedType()
-
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
-
-