Class ContentFragmentDataBuilder
- java.lang.Object
-
- com.adobe.cq.wcm.core.components.models.datalayer.builder.GenericDataBuilder<T,K>
-
- com.adobe.cq.wcm.core.components.models.datalayer.builder.ContentFragmentDataBuilder
-
public final class ContentFragmentDataBuilder extends GenericDataBuilder<T,K>
Data builder for content fragment components.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull ContentFragmentData
build()
Build the data.T
withDescription(@NotNull java.util.function.Supplier<java.lang.String> supplier)
Set the supplier that supplies the component's description.@NotNull ContentFragmentDataBuilder
withElementsData(@NotNull java.util.function.Supplier<ContentFragmentData.ElementData[]> supplier)
Set the supplier that supplies the content fragment data.T
withLastModifiedDate(@NotNull java.util.function.Supplier<java.util.Date> supplier)
Set the supplier that supplies the component's last modified date.T
withLinkUrl(@NotNull java.util.function.Supplier<java.lang.String> supplier)
Sets the supplier that supplies the component's link URL.T
withParentId(@NotNull java.util.function.Supplier<java.lang.String> supplier)
Set the supplier that supplies the component's parent ID.T
withText(@NotNull java.util.function.Supplier<java.lang.String> supplier)
Set the supplier that supplies the component's text.T
withTitle(@NotNull java.util.function.Supplier<java.lang.String> supplier)
Set the supplier that supplies the component's title.T
withType(@NotNull java.util.function.Supplier<java.lang.String> supplier)
Set the supplier that supplies the component's type.-
Methods inherited from class com.adobe.cq.wcm.core.components.models.datalayer.builder.GenericDataBuilder
withId
-
-
-
-
Method Detail
-
withElementsData
@NotNull public @NotNull ContentFragmentDataBuilder withElementsData(@NotNull @NotNull java.util.function.Supplier<ContentFragmentData.ElementData[]> supplier)
Set the supplier that supplies the content fragment data.- Parameters:
supplier
- The content fragment data value supplier.- Returns:
- A new
ContentFragmentDataBuilder
.
-
build
@NotNull public @NotNull ContentFragmentData build()
Description copied from class:GenericDataBuilder
Build the data.- Specified by:
build
in classGenericDataBuilder<ContentFragmentDataBuilder,ContentFragmentData>
- Returns:
- The data object.
-
withType
@NotNull public T withType(@NotNull @NotNull java.util.function.Supplier<java.lang.String> supplier)
Set the supplier that supplies the component's type.- Parameters:
supplier
- The type value supplier.- Returns:
- A new data builder.
- See Also:
ComponentData.getType()
-
withLastModifiedDate
@NotNull public T withLastModifiedDate(@NotNull @NotNull java.util.function.Supplier<java.util.Date> supplier)
Set the supplier that supplies the component's last modified date.- Parameters:
supplier
- The last modified date value supplier.- Returns:
- A new data builder.
- See Also:
ComponentData.getLastModifiedDate()
-
withParentId
@NotNull public T withParentId(@NotNull @NotNull java.util.function.Supplier<java.lang.String> supplier)
Set the supplier that supplies the component's parent ID.- Parameters:
supplier
- The parent ID value supplier.- Returns:
- A new data builder.
- See Also:
ComponentData.getParentId()
-
withTitle
@NotNull public T withTitle(@NotNull @NotNull java.util.function.Supplier<java.lang.String> supplier)
Set the supplier that supplies the component's title.- Parameters:
supplier
- The title value supplier.- Returns:
- A new data builder.
- See Also:
ComponentData.getTitle()
-
withDescription
@NotNull public T withDescription(@NotNull @NotNull java.util.function.Supplier<java.lang.String> supplier)
Set the supplier that supplies the component's description.- Parameters:
supplier
- The description value supplier.- Returns:
- A new data builder.
- See Also:
ComponentData.getDescription()
-
withText
@NotNull public T withText(@NotNull @NotNull java.util.function.Supplier<java.lang.String> supplier)
Set the supplier that supplies the component's text.- Parameters:
supplier
- The text value supplier.- Returns:
- A new data builder.
- See Also:
ComponentData.getText()
-
withLinkUrl
@NotNull public T withLinkUrl(@NotNull @NotNull java.util.function.Supplier<java.lang.String> supplier)
Sets the supplier that supplies the component's link URL.- Parameters:
supplier
- The link URL value supplier.- Returns:
- A new data builder.
- See Also:
ComponentData.getLinkUrl()
-
-