java.lang.Object
com.adobe.cq.wcm.core.components.models.datalayer.builder.DataLayerBuilder

public final class DataLayerBuilder extends Object
Data layer builder utility. This utility is designed to help build valid data models for integration with Adobe Client Data Layer.
  • Method Details

    • forComponent

      Get a ComponentDataBuilder for a component.
      Returns:
      An empty ComponentDataBuilder.
    • forContainer

      Get a ComponentDataBuilder for a container component
      Returns:
      An empty ContainerDataBuilder.
    • forImageComponent

      public static IdRequiredDataBuilder<ImageComponentDataBuilder,ImageData> forImageComponent()
      Get a ImageComponentDataBuilder for an image component.
      Returns:
      An empty ImageComponentDataBuilder.
    • forPage

      Get a PageDataBuilder for a page.
      Returns:
      An empty PageDataBuilder.
    • forAsset

      Get a AssetDataBuilder for an asset.
      Returns:
      An empty AssetDataBuilder.
    • forAsset

      public static AssetDataBuilder forAsset(@NotNull @NotNull Asset asset)
      Get an AssetDataBuilder with standard asset data. This builder is suitable for most DAM Assets and pre-populates all required fields from the asset metadata.
      Parameters:
      asset - The asset used to initialize the AssetDataBuilder.
      Returns:
      A new AssetDataBuilder pre-initialized using the DAM asset metadata.
    • extending

      public static AssetDataBuilder extending(@NotNull @NotNull AssetData assetData)
      Get a AssetDataBuilder that extends existing asset data.
      Parameters:
      assetData - The asset data to extend.
      Returns:
      A new AssetDataBuilder pre-initialized with the existing asset data.
    • extending

      public static ComponentDataLayerExtender extending(@NotNull @NotNull ComponentData componentData)
      Extend an existing component data layer model.
      Parameters:
      componentData - The component data to extend.
      Returns:
      The component data layer extender.