Interface ExperienceFragment

All Superinterfaces:
Component, ComponentExporter, ContainerExporter

@ConsumerType public interface ExperienceFragment extends Component, ContainerExporter
Defines the ExperienceFragment Sling Model used for the /apps/core/wcm/components/experiencefragment component.
Since:
com.adobe.cq.wcm.core.components.models 12.9.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Name of the configuration policy property that specifies the experience fragment variation path.

    Fields inherited from interface com.adobe.cq.wcm.core.components.models.Component

    PN_ID
  • Method Summary

    Modifier and Type
    Method
    Description
    default @Nullable String
    Generates some container class names (needed for SPA framework)
    default @NotNull Map<String,? extends ComponentExporter>
    Returns the map of all exported child items (resource names from Sling Model classes).
    default @NotNull String[]
    Returns the order of items in the map.
    default @NotNull String
    Returns the type of the resource for which the export is performed.
    default String
    Returns the localized path of the experience fragment variation if the experience fragment resource is defined in the template.
    default String
    Returns the technical name of the experience fragment.
    default boolean
    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 Details

    • PN_FRAGMENT_VARIATION_PATH

      static final String PN_FRAGMENT_VARIATION_PATH
      Name of the configuration policy property that specifies the experience fragment variation path. The property should provide a String value.
      Since:
      com.adobe.cq.wcm.core.components.models 12.9.0
      See Also:
  • Method Details

    • getLocalizedFragmentVariationPath

      default 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, null otherwise. 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 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 @Nullable 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 String getExportedType()
      Description copied from interface: ComponentExporter

      Returns 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:
      getExportedType in interface Component
      Specified by:
      getExportedType in interface ComponentExporter
      Returns:
      the type of the component
      Since:
      com.adobe.cq.wcm.core.components.models 12.9.0
      See Also:
    • getExportedItemsOrder

      @NotNull default @NotNull 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 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 12.15.0
      See Also:
    • getExportedItems

      @NotNull default @NotNull Map<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 interface ContainerExporter
      Returns:
      the map of all exported child items
      Since:
      com.adobe.cq.wcm.core.components.models 12.15.0
      See Also: