Interface ExperienceFragment
-
- All Superinterfaces:
Component,ComponentExporter,ContainerExporter
@ConsumerType public interface ExperienceFragment extends Component, ContainerExporter
Defines theExperienceFragmentSling Model used for the/apps/core/wcm/components/experiencefragmentcomponent.- Since:
- com.adobe.cq.wcm.core.components.models 12.9.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPN_FRAGMENT_VARIATION_PATHName of the configuration policy property that specifies the experience fragment variation path.
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default java.lang.StringgetCssClassNames()Generates some container class names (needed for SPA framework)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.StringgetExportedType()Returns the type of the resource for which the export is performed.default java.lang.StringgetLocalizedFragmentVariationPath()Returns the localized path of the experience fragment variation if the experience fragment resource is defined in the template.default java.lang.StringgetName()Returns the technical name of the experience fragment.default booleanisConfigured()Simple boolean flag to check if the experience fragment variation and its underlying experience fragment is configured.-
Methods inherited from interface com.adobe.cq.wcm.core.components.models.Component
getAppliedCssClasses, getData, getId
-
-
-
-
Field Detail
-
PN_FRAGMENT_VARIATION_PATH
static final java.lang.String PN_FRAGMENT_VARIATION_PATH
Name of the configuration policy property that specifies the experience fragment variation path. The property should provide aStringvalue.- Since:
- com.adobe.cq.wcm.core.components.models 12.9.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
getLocalizedFragmentVariationPath
default java.lang.String getLocalizedFragmentVariationPath()
Returns the localized path of the experience fragment variation if the experience fragment resource is defined in the template. If not, it returns the configured fragment path if it exists,nullotherwise. If both the content page and the experience fragment have a localized root (language, live copy or blueprint), - it is then assumed that the content pages and the experience fragments follow the same structure patterns - this method returns the localized path of the experience fragment based on the localization of the content page if it exists, otherwise it returns the fragment path that is configured, suffixed with "/jcr:content".- Returns:
- Localized experience fragment variation path
- Since:
- com.adobe.cq.wcm.core.components.models 12.9.0
-
getName
default java.lang.String getName()
Returns the technical name of the experience fragment.- Returns:
- the technical name of the experience fragment
- Since:
- com.adobe.cq.wcm.core.components.models 12.11.0
-
getCssClassNames
@Nullable default java.lang.String getCssClassNames()
Generates some container class names (needed for SPA framework)- Returns:
- Css Class names
- Since:
- com.adobe.cq.wcm.core.components.models 12.15.0
-
isConfigured
default boolean isConfigured()
Simple boolean flag to check if the experience fragment variation and its underlying experience fragment is configured. If the localizedFragmentVariationPath path is not configured or the children are empty, this wis will return false.- Returns:
- localizedFragmentVariationPath is configured and has entries
- Since:
- com.adobe.cq.wcm.core.components.models 12.15.0
-
getExportedType
@NotNull default @NotNull java.lang.String getExportedType()
Description copied from interface:ComponentExporterReturns the type of the resource for which the export is performed.
NOTE: methods whose JSON serialization would lead to the same JSON property name (":type") will not be serialized.
- Specified by:
getExportedTypein interfaceComponent- Specified by:
getExportedTypein interfaceComponentExporter- Returns:
- the type of the component
- Since:
- com.adobe.cq.wcm.core.components.models 12.9.0
- See Also:
ComponentExporter.getExportedType()
-
getExportedItemsOrder
@NotNull default @NotNull java.lang.String[] getExportedItemsOrder()
Description copied from interface:ContainerExporterReturns 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:
getExportedItemsOrderin 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.15.0
- See Also:
ContainerExporter.getExportedItemsOrder()
-
getExportedItems
@NotNull default @NotNull java.util.Map<java.lang.String,? extends ComponentExporter> getExportedItems()
Description copied from interface:ContainerExporterReturns 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:
getExportedItemsin interfaceContainerExporter- Returns:
- the map of all exported child items
- Since:
- com.adobe.cq.wcm.core.components.models 12.15.0
- See Also:
ContainerExporter.getExportedItems()
-
-