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 Object
Generic data builder that specifies fields available on all data builders. Every data builder should implement this interface.
  • Method Details

    • withId

      @NotNull public final T withId(@NotNull @NotNull Supplier<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.