Interface ExperienceFragment

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String PN_FRAGMENT_VARIATION_PATH
      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

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default java.lang.String getCssClassNames()
      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.String getExportedType()
      Returns the type of the resource for which the export is performed.
      default java.lang.String getLocalizedFragmentVariationPath()
      Returns the localized path of the experience fragment variation if the experience fragment resource is defined in the template.
      default java.lang.String getName()
      Returns the technical name of the experience fragment.
      default boolean isConfigured()
      Simple boolean flag to check if the experience fragment variation and its underlying experience fragment is configured.
    • 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 a String value.
        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, 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 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: 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:
        ComponentExporter.getExportedType()
      • getExportedItemsOrder

        @NotNull
        default @NotNull java.lang.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:
        ContainerExporter.getExportedItemsOrder()
      • getExportedItems

        @NotNull
        default @NotNull java.util.Map<java.lang.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:
        ContainerExporter.getExportedItems()