Class ComponentDataBuilder
java.lang.Object
com.adobe.cq.wcm.core.components.models.datalayer.builder.GenericDataBuilder<ComponentDataBuilder,ComponentData>
com.adobe.cq.wcm.core.components.models.datalayer.builder.ComponentDataBuilder
public final class ComponentDataBuilder
extends GenericDataBuilder<ComponentDataBuilder,ComponentData>
Data builder for components that are not a specific type of component.
I.e. for components that are not pages, containers, or image components.
This builder will produce a valid
ComponentData object.
For more specific data builders please see:
-
Method Summary
Modifier and TypeMethodDescription@NotNull ComponentDatabuild()Build the data.withDescription(@NotNull Supplier<String> supplier) Set the supplier that supplies the component's description.withLastModifiedDate(@NotNull Supplier<Date> supplier) Set the supplier that supplies the component's last modified date.withLinkUrl(@NotNull Supplier<String> supplier) Sets the supplier that supplies the component's link URL.withParentId(@NotNull Supplier<String> supplier) Set the supplier that supplies the component's parent ID.Set the supplier that supplies the component's text.Set the supplier that supplies the component's title.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 Details
-
build
Description copied from class:GenericDataBuilderBuild the data.- Specified by:
buildin classGenericDataBuilder<ComponentDataBuilder,ComponentData> - Returns:
- The data object.
-
withType
Set the supplier that supplies the component's type.- Parameters:
supplier- The type value supplier.- Returns:
- A new data builder.
- See Also:
-
withLastModifiedDate
@NotNull public ComponentDataBuilder withLastModifiedDate(@NotNull @NotNull Supplier<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:
-
withParentId
Set the supplier that supplies the component's parent ID.- Parameters:
supplier- The parent ID value supplier.- Returns:
- A new data builder.
- See Also:
-
withTitle
Set the supplier that supplies the component's title.- Parameters:
supplier- The title value supplier.- Returns:
- A new data builder.
- See Also:
-
withDescription
Set the supplier that supplies the component's description.- Parameters:
supplier- The description value supplier.- Returns:
- A new data builder.
- See Also:
-
withText
Set the supplier that supplies the component's text.- Parameters:
supplier- The text value supplier.- Returns:
- A new data builder.
- See Also:
-
withLinkUrl
Sets the supplier that supplies the component's link URL.- Parameters:
supplier- The link URL value supplier.- Returns:
- A new data builder.
- See Also:
-