Package com.adobe.cq.testing.client
Class ExperienceFragmentsClient.ExperienceFragmentBuilder
java.lang.Object
com.adobe.cq.testing.client.ExperienceFragmentsClient.ExperienceFragmentBuilder
- Enclosing class:
ExperienceFragmentsClient
An Experience Fragment builder
-
Constructor Summary
ConstructorDescriptionExperienceFragmentBuilder
(ExperienceFragmentsClient client, String xfTitle, String variantTitle, String variantTemplate) Constructor -
Method Summary
Modifier and TypeMethodDescriptionaddVariantTag
(String variantTag) Add a tag to the Experience Fragment VariantaddVariantTags
(List<String> variantTags) Add tags to the Experience Fragment VariantAdd a tag to the Experience FragmentAdd tags to the Experience Fragmentorg.apache.sling.testing.clients.SlingHttpResponse
create
(int... expectedStatus) Create the Experience Fragment with the information configured in this builder objectwithParentPath
(String parentPath) Set the parent pathwithVariantName
(String variantName) Set the Experience Fragment Variant namewithXFDescription
(String description) Set the Experience Fragment descriptionwithXFName
(String xfName) Set the Experience Fragment name
-
Constructor Details
-
ExperienceFragmentBuilder
public ExperienceFragmentBuilder(ExperienceFragmentsClient client, String xfTitle, String variantTitle, String variantTemplate) Constructor- Parameters:
client
- the Experience Fragment clientxfTitle
- the title for the Experience FragmentvariantTitle
- the title for the Experience Fragment VariantvariantTemplate
- the template for the Experience Fragment Variant
-
-
Method Details
-
withParentPath
Set the parent path- Parameters:
parentPath
- parent path- Returns:
- this
-
withXFName
Set the Experience Fragment name- Parameters:
xfName
- name- Returns:
- this
-
withXFDescription
Set the Experience Fragment description- Parameters:
description
- experience fragment description- Returns:
- this
-
addXFTag
Add a tag to the Experience Fragment- Parameters:
xfTag
- tag to be added- Returns:
- this
-
addXFTags
Add tags to the Experience Fragment- Parameters:
xfTags
- list of tags to be added- Returns:
- this
-
withVariantName
Set the Experience Fragment Variant name- Parameters:
variantName
- variant name- Returns:
- this
-
addVariantTag
Add a tag to the Experience Fragment Variant- Parameters:
variantTag
- variant tag- Returns:
- this
-
addVariantTags
Add tags to the Experience Fragment Variant- Parameters:
variantTags
- 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 with the information configured in this builder object- Parameters:
expectedStatus
- http status expected after sending the Experience Fragment create request- Returns:
- The full
SlingHttpResponse
for the experience fragment create request - Throws:
org.apache.sling.testing.clients.ClientException
- if the request fails
-