Package com.adobe.cq.testing.client
Class ExperienceFragmentsClient.ExperienceFragmentVariantBuilder
java.lang.Object
com.adobe.cq.testing.client.ExperienceFragmentsClient.ExperienceFragmentVariantBuilder
- Enclosing class:
ExperienceFragmentsClient
An Experience Fragment Variant builder
-
Constructor Summary
ConstructorsConstructorDescriptionExperienceFragmentVariantBuilder(ExperienceFragmentsClient client, String parentPath, String template, String title) Constructor -
Method Summary
Modifier and TypeMethodDescriptionAdd tag to the variantAdd tags to the variantsorg.apache.sling.testing.clients.SlingHttpResponsecreate(int... expectedStatus) Create the Experience Fragment Variant with the information configured in this builder objectwithDescription(String description) Set variant descriptionSet variant name
-
Constructor Details
-
ExperienceFragmentVariantBuilder
public ExperienceFragmentVariantBuilder(ExperienceFragmentsClient client, String parentPath, String template, String title) Constructor- Parameters:
client- Experience Fragment clientparentPath- parent Experience Fragment pathtemplate- variant templatetitle- variant title
-
-
Method Details
-
withName
Set variant name- Parameters:
name- variant name- Returns:
- this
-
withDescription
public ExperienceFragmentsClient.ExperienceFragmentVariantBuilder withDescription(String description) Set variant description- Parameters:
description- variant description- Returns:
- this
-
addTag
Add tag to the variant- Parameters:
tag- variant tag- Returns:
- this
-
addTags
Add tags to the variants- Parameters:
tags- list of variant tags- Returns:
- this
-
create
public org.apache.sling.testing.clients.SlingHttpResponse create(int... expectedStatus) throws org.apache.sling.testing.clients.ClientException Create the Experience Fragment Variant with the information configured in this builder object- Parameters:
expectedStatus- http status expected after sending the Experience Fragment Variant create request- Returns:
- The full
SlingHttpResponsefor the experience fragment variant create request - Throws:
org.apache.sling.testing.clients.ClientException- if the request fails
-