Class GenericDataBuilder<T extends GenericDataBuilder<T,K>,K>
- java.lang.Object
-
- com.adobe.cq.wcm.core.components.models.datalayer.builder.GenericDataBuilder<T,K>
-
- Type Parameters:
T- The data builder type.K- The data type.
- Direct Known Subclasses:
AssetDataBuilder,ComponentDataBuilder,ContainerDataBuilder,ContentFragmentDataBuilder,EmbeddableDataBuilder,ImageComponentDataBuilder,PageDataBuilder
public abstract class GenericDataBuilder<T extends GenericDataBuilder<T,K>,K> extends java.lang.ObjectGeneric data builder that specifies fields available on all data builders. Every data builder should implement this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Kbuild()Build the data.TwithId(@NotNull java.util.function.Supplier<java.lang.String> supplier)Set the supplier that supplies the component's ID.
-
-
-
Method Detail
-
withId
@NotNull public final T withId(@NotNull @NotNull java.util.function.Supplier<java.lang.String> supplier)
Set the supplier that supplies the component's ID.- Parameters:
supplier- The ID value supplier.- Returns:
- A new builder.
-
build
@NotNull public abstract K build()
Build the data.- Returns:
- The data object.
-
-