Class DataLayerBuilder
java.lang.Object
com.adobe.cq.wcm.core.components.models.datalayer.builder.DataLayerBuilder
Data layer builder utility.
This utility is designed to help build valid data models for integration with
Adobe Client Data Layer.
-
Method Summary
Modifier and TypeMethodDescriptionstatic AssetDataBuilderGet a AssetDataBuilder that extends existing asset data.static ComponentDataLayerExtenderextending(@NotNull ComponentData componentData) Extend an existing component data layer model.forAsset()Get a AssetDataBuilder for an asset.static AssetDataBuilderGet an AssetDataBuilder with standard asset data.Get a ComponentDataBuilder for a component.Get a ComponentDataBuilder for a container componentGet a ImageComponentDataBuilder for an image component.forPage()Get a PageDataBuilder for a page.
-
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
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
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
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
Extend an existing component data layer model.- Parameters:
componentData- The component data to extend.- Returns:
- The component data layer extender.
-