public class ExperienceFragmentsClient extends CQClient
Modifier and Type | Class and Description |
---|---|
static class |
ExperienceFragmentsClient.ContentFragmentComponent
Content Fragment component
|
static interface |
ExperienceFragmentsClient.ContentFragmentVariantCompoents |
static class |
ExperienceFragmentsClient.ConvertToXFAction
Convert a component to an Experience Fragment
|
static class |
ExperienceFragmentsClient.ExperienceFragementsConfigurationBuilder
Experience Fragments configuration builder as it can be done from the UI
|
static class |
ExperienceFragmentsClient.ExperienceFragment
Representation of the Experience Fragment
NOTE: All properties are cached.
|
class |
ExperienceFragmentsClient.ExperienceFragmentBuilder
An Experience Fragment builder
|
static class |
ExperienceFragmentsClient.ExperienceFragmentsConfiguration
Representation the configuration of the Experience Fragments Feature, as it can be done from the UI
NOTE: All properties are cached.
|
static class |
ExperienceFragmentsClient.ExperienceFragmentVariant
Representation of the Experience Fragment Variant
NOTE: All properties are cached.
|
static class |
ExperienceFragmentsClient.ExperienceFragmentVariantBuilder
An Experience Fragment Variant builder
|
static class |
ExperienceFragmentsClient.FacebookVariantComponents
Class that enable consumers to configure variant components from the Facebook template
|
static class |
ExperienceFragmentsClient.ImageComponent
Image component
|
static interface |
ExperienceFragmentsClient.ImageVariantComponents |
static class |
ExperienceFragmentsClient.PinterestVariantComponents
Class that enable consumers to configure variant components from the Pinterest template
|
static class |
ExperienceFragmentsClient.POSVariantComponents
Class that enable consumers to configure variant components from the POS template
|
static class |
ExperienceFragmentsClient.TextComponent
Test component
|
static interface |
ExperienceFragmentsClient.TextVariantComponents |
static class |
ExperienceFragmentsClient.VariantComponents
Base class for classes mapped to predefined templates that enable consumers to configure variant components from that template
|
static class |
ExperienceFragmentsClient.XF_TAG
Experience Fragments predefined tags
|
static class |
ExperienceFragmentsClient.XF_TEMPLATE
Experience Fragments predefined templates
|
static interface |
ExperienceFragmentsClient.XFTag
Interface with methods that all predefined XF tags from the XF_TAG must implement
|
static interface |
ExperienceFragmentsClient.XFTemplate
Interface with methods that all predefined XF templates from the XF_TEMPLATE must implement
|
CQClient.Builder, CQClient.InternalBuilder<T extends CQClient>
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_XF_PARENT_PATH |
static String |
TITLE_PROP |
LOG, STATISTICS_ROOT, wcmCommands
Constructor and Description |
---|
ExperienceFragmentsClient(org.apache.http.impl.client.CloseableHttpClient http,
org.apache.sling.testing.clients.SlingClientConfig config) |
ExperienceFragmentsClient(URI serverUrl,
String user,
String password) |
Modifier and Type | Method and Description |
---|---|
ExperienceFragmentsClient.ExperienceFragementsConfigurationBuilder |
configurationBuilder()
Create a new Experience Fragments configuration builder
|
ExperienceFragmentsClient.ConvertToXFAction |
convertToXF()
Initiate a Convert to Experience Fragment
|
org.apache.sling.testing.clients.SlingHttpResponse |
createExperienceFragment(String xfTitle,
String variantTitle,
ExperienceFragmentsClient.XF_TEMPLATE variantTemplate,
int... expectedStatus)
Create an Experience Fragment
|
org.apache.sling.testing.clients.SlingHttpResponse |
createExperienceFragment(String xfTitle,
String variantTitle,
String variantTemplate,
int... expectedStatus)
Create an Experience Fragment
|
org.apache.sling.testing.clients.SlingHttpResponse |
createVariationAsLiveCopy(String sourceVariantPath,
String title,
String name,
String[] rolloutConfigs,
int... expectedStatus)
Create a Live Copy of an Experience Fragment Variant
The new variant will be created under the same Experience Fragment
|
org.apache.sling.testing.clients.SlingHttpResponse |
createXfVariant(String parentPath,
ExperienceFragmentsClient.XF_TEMPLATE template,
String title,
int... expectedStatus)
Create an Experience Fragment Variant
|
org.apache.sling.testing.clients.SlingHttpResponse |
createXfVariant(String parentPath,
String template,
String title,
int... expectedStatus)
Create an Experience Fragment Variant
|
org.apache.sling.testing.clients.SlingHttpResponse |
deleteExperienceFragment(String path,
boolean force,
int... expectedStatus)
Delete an Experience Fragment
|
org.apache.sling.testing.clients.SlingHttpResponse |
deleteExperienceFragment(String path,
int... expectedStatus)
Force delete an Experience Fragment
|
org.apache.sling.testing.clients.SlingHttpResponse |
deleteXfVariant(String variantPath,
int... expectedStatus)
Delete an Experience Fragment Variant
|
ExperienceFragmentsClient.ExperienceFragmentBuilder |
experienceFragmentBuilder(String xfTitle,
String variantTitle,
ExperienceFragmentsClient.XF_TEMPLATE variantTemplate)
|
ExperienceFragmentsClient.ExperienceFragmentBuilder |
experienceFragmentBuilder(String xfTitle,
String variantTitle,
String variantTemplate)
|
<T extends ExperienceFragmentsClient.VariantComponents> |
getComponents(String variantPath,
ExperienceFragmentsClient.XF_TEMPLATE template)
A
ExperienceFragmentsClient.VariantComponents subclass object that can be used to configure the variant components defined in the template |
ExperienceFragmentsClient.ExperienceFragmentsConfiguration |
getCurrentConfiguration()
Get the current Configuration for Experience Fragments
|
ExperienceFragmentsClient.ExperienceFragment |
getExperienceFragment(String xfPath)
Get the Experience Fragment as an object of
ExperienceFragmentsClient.ExperienceFragment class |
static String |
getParentXFPath(String variantPath)
Get the path of the parent Experience Fragment, given the path of the Experience Fragment Variant
|
org.apache.sling.testing.clients.SlingHttpResponse |
getPlainHtmlRendering(String variantPath,
int... expectedStatus)
Call the Plain Html Processor for an Experience Fragment Variant
|
org.apache.sling.testing.clients.SlingHttpResponse |
getSocialUrls(String variantPath,
int... expectedStatus)
Get the Social Urls for the a Social Experience Fragment Variant
|
org.apache.sling.testing.clients.SlingHttpResponse |
getVariantProperitesPageHTML(String variantPath,
int... expectedStatus) |
org.apache.sling.testing.clients.SlingHttpResponse |
getXFPropertiesPageHTHML(String xfPath,
int... expectedStatus) |
ExperienceFragmentsClient.ExperienceFragmentVariant |
getXFVariant(String variantPath)
Get the Experience Fragment Variant as an object of
ExperienceFragmentsClient.ExperienceFragmentVariant class |
org.apache.sling.testing.clients.SlingHttpResponse |
publishXF(String xfPath,
int... expectedStatus) |
org.apache.sling.testing.clients.SlingHttpResponse |
publishXFVariant(String variantPath,
int... expectedStatus) |
org.apache.sling.testing.clients.SlingHttpResponse |
unblishXF(String xfPath,
int... expectedStatus) |
org.apache.sling.testing.clients.SlingHttpResponse |
unpublish(String pagePath,
int... expectedStatus) |
org.apache.sling.testing.clients.SlingHttpResponse |
unpublishXFVariant(String variantPath,
int... expectedStatus) |
ExperienceFragmentsClient.ExperienceFragmentVariantBuilder |
xfVariantBuilder(String parentPath,
ExperienceFragmentsClient.XF_TEMPLATE template,
String title)
|
ExperienceFragmentsClient.ExperienceFragmentVariantBuilder |
xfVariantBuilder(String parentPath,
String template,
String title)
|
copyLanguages, copyPage, createPage, createPageWithRetry, createVersion, deletePage, deletePageWithRetry, lockPage, movePage, movePage, resetPageStatistics, restoreTree, restoreVersion, rolloutPage, searchAndReplaceInPages, searchInPages, setPageProperties, setPageProperty, setPagePropertyImage, unlockPage, uploadAsset, uploadFileCQStyle
createFolder, createNode, createNodeRecursive, deletePath, doGetJson, exists, getJsonNode, getJsonNode, getNodeNameFromPath, getParentPath, getUUId, getUUID, importContent, importContent, importJson, move, setPropertiesString, setPropertyString, setPropertyStringArray, upload, waitExists, waitUntilExists
adaptTo, addValue, close, doDelete, doGet, doGet, doGet, doHead, doPatch, doPost, doPost, doPut, doRawRequest, doRequest, doStreamGet, doStreamPost, doStreamRequest, execute, execute, execute, execute, execute, execute, execute, execute, getClientId, getConnectionManager, getCookieStore, getCredentialsProvider, getParams, getPassword, getPath, getPath, getUrl, getUrl, getUrl, getUser, getValue, getValues, hasValue
public static final String DEFAULT_XF_PARENT_PATH
public static final String TITLE_PROP
public ExperienceFragmentsClient(org.apache.http.impl.client.CloseableHttpClient http, org.apache.sling.testing.clients.SlingClientConfig config) throws org.apache.sling.testing.clients.ClientException
org.apache.sling.testing.clients.ClientException
public ExperienceFragmentsClient.ExperienceFragmentBuilder experienceFragmentBuilder(String xfTitle, String variantTitle, String variantTemplate)
xfTitle
- title for the experience fragmentvariantTitle
- title for the experience fragment variantvariantTemplate
- template for the experience fragment variantExperienceFragmentsClient.ExperienceFragmentBuilder
public ExperienceFragmentsClient.ExperienceFragmentBuilder experienceFragmentBuilder(String xfTitle, String variantTitle, ExperienceFragmentsClient.XF_TEMPLATE variantTemplate)
xfTitle
- title for the experience fragmentvariantTitle
- title for the experience fragment variantvariantTemplate
- template for the experience fragment variantExperienceFragmentsClient.ExperienceFragmentBuilder
public org.apache.sling.testing.clients.SlingHttpResponse createExperienceFragment(String xfTitle, String variantTitle, String variantTemplate, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
xfTitle
- title for the experience fragmentvariantTitle
- title for the experience fragment variantvariantTemplate
- template for the experience fragment variantexpectedStatus
- Http status expected after creation of the experience fragmentSlingHttpResponse
for the experience fragment create requestorg.apache.sling.testing.clients.ClientException
- if the request failspublic org.apache.sling.testing.clients.SlingHttpResponse createExperienceFragment(String xfTitle, String variantTitle, ExperienceFragmentsClient.XF_TEMPLATE variantTemplate, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
xfTitle
- title for the experience fragmentvariantTitle
- title for the experience fragment variantvariantTemplate
- template for the experience fragment variantexpectedStatus
- http status expected after creation of the experience fragmentSlingHttpResponse
for the experience fragment create requestorg.apache.sling.testing.clients.ClientException
- if the request failspublic ExperienceFragmentsClient.ExperienceFragmentVariantBuilder xfVariantBuilder(String parentPath, String template, String title)
parentPath
- the parent experience fragment pathtemplate
- the variant templatetitle
- the variant titleExperienceFragmentsClient.ExperienceFragmentVariantBuilder
public ExperienceFragmentsClient.ExperienceFragmentVariantBuilder xfVariantBuilder(String parentPath, ExperienceFragmentsClient.XF_TEMPLATE template, String title)
parentPath
- the parent experience fragment pathtemplate
- the variant templatetitle
- the variant titleExperienceFragmentsClient.ExperienceFragmentVariantBuilder
public org.apache.sling.testing.clients.SlingHttpResponse createXfVariant(String parentPath, String template, String title, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
parentPath
- the parent experience fragment pathtemplate
- the variant templatetitle
- the variant titleexpectedStatus
- http status expected after creation of the experience fragment variantSlingHttpResponse
for the experience fragment variant create requestorg.apache.sling.testing.clients.ClientException
- if the request failspublic org.apache.sling.testing.clients.SlingHttpResponse createXfVariant(String parentPath, ExperienceFragmentsClient.XF_TEMPLATE template, String title, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
parentPath
- the parent experience fragment pathtemplate
- the variant templatetitle
- the variant titleexpectedStatus
- http status expected after creation of the experience fragment variantSlingHttpResponse
for the experience fragment variant create requestorg.apache.sling.testing.clients.ClientException
- if the request failspublic org.apache.sling.testing.clients.SlingHttpResponse createVariationAsLiveCopy(String sourceVariantPath, String title, String name, String[] rolloutConfigs, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
sourceVariantPath
- the path of the source experience fragment varianttitle
- the live copy variant's titlename
- the live copy variant's namerolloutConfigs
- the rollout configurations for the live copyexpectedStatus
- http status expected after creation of the experience fragment variant live copySlingHttpResponse
for the experience fragment variant live copy create requestorg.apache.sling.testing.clients.ClientException
- if the request failspublic org.apache.sling.testing.clients.SlingHttpResponse deleteExperienceFragment(String path, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
path
- the path of the Experience FragmentexpectedStatus
- http status expected after deleting the experience fragmentSlingHttpResponse
for the experience fragment delete requestorg.apache.sling.testing.clients.ClientException
- if the request failspublic org.apache.sling.testing.clients.SlingHttpResponse deleteExperienceFragment(String path, boolean force, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
path
- the path of the Experience Fragmentforce
- force deleteexpectedStatus
- http status expected after deleting the experience fragmentSlingHttpResponse
for the experience fragment delete requestorg.apache.sling.testing.clients.ClientException
- if the request failspublic org.apache.sling.testing.clients.SlingHttpResponse deleteXfVariant(String variantPath, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
variantPath
- the path of the Experience Fragment VariantexpectedStatus
- http status expected after deleting the experience fragment variantSlingHttpResponse
for the experience fragment variant delete requestorg.apache.sling.testing.clients.ClientException
- if the request failspublic ExperienceFragmentsClient.ExperienceFragment getExperienceFragment(String xfPath) throws org.apache.sling.testing.clients.ClientException
ExperienceFragmentsClient.ExperienceFragment
classxfPath
- the path of the Experience FragmentExperienceFragmentsClient.ExperienceFragment
classorg.apache.sling.testing.clients.ClientException
- if the request failspublic ExperienceFragmentsClient.ExperienceFragmentVariant getXFVariant(String variantPath) throws org.apache.sling.testing.clients.ClientException
ExperienceFragmentsClient.ExperienceFragmentVariant
classvariantPath
- the path of the Experience Fragment VariantExperienceFragmentsClient.ExperienceFragmentVariant
classorg.apache.sling.testing.clients.ClientException
- if the request failspublic org.apache.sling.testing.clients.SlingHttpResponse getPlainHtmlRendering(String variantPath, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
variantPath
- the path for the of Experience Fragment VariantexpectedStatus
- http status expected after calling the the Plain Html Processor for the variantSlingHttpResponse
for the experience fragment variant plain html processor request.
The HTML rendition can be obtained by calling SlingHttpResponse.getContent()
methodorg.apache.sling.testing.clients.ClientException
- if the request failspublic org.apache.sling.testing.clients.SlingHttpResponse getSocialUrls(String variantPath, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
variantPath
- the path for the Social Experience Fragment VariantexpectedStatus
- http status expected after requesting the social urls for the social variantSlingHttpResponse
after requesting the social urls for the social variant
The Social Urls are in JSON format and can be obtained by calling SlingHttpResponse.getContent()
methodorg.apache.sling.testing.clients.ClientException
- if the request failspublic ExperienceFragmentsClient.ConvertToXFAction convertToXF()
ExperienceFragmentsClient.ConvertToXFAction
public org.apache.sling.testing.clients.SlingHttpResponse getXFPropertiesPageHTHML(String xfPath, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
org.apache.sling.testing.clients.ClientException
public org.apache.sling.testing.clients.SlingHttpResponse getVariantProperitesPageHTML(String variantPath, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
org.apache.sling.testing.clients.ClientException
public ExperienceFragmentsClient.ExperienceFragmentsConfiguration getCurrentConfiguration() throws org.apache.sling.testing.clients.ClientException
org.apache.sling.testing.clients.ClientException
- if the configuration cannot be retrievedpublic ExperienceFragmentsClient.ExperienceFragementsConfigurationBuilder configurationBuilder() throws org.apache.sling.testing.clients.ClientException
org.apache.sling.testing.clients.ClientException
- if the builder cannot be createdpublic org.apache.sling.testing.clients.SlingHttpResponse unpublish(String pagePath, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
org.apache.sling.testing.clients.ClientException
public org.apache.sling.testing.clients.SlingHttpResponse publishXFVariant(String variantPath, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
org.apache.sling.testing.clients.ClientException
public org.apache.sling.testing.clients.SlingHttpResponse publishXF(String xfPath, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
org.apache.sling.testing.clients.ClientException
public org.apache.sling.testing.clients.SlingHttpResponse unpublishXFVariant(String variantPath, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
org.apache.sling.testing.clients.ClientException
public org.apache.sling.testing.clients.SlingHttpResponse unblishXF(String xfPath, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
org.apache.sling.testing.clients.ClientException
public static String getParentXFPath(String variantPath)
variantPath
- the path of the Experience Fragment Variantpublic <T extends ExperienceFragmentsClient.VariantComponents> T getComponents(String variantPath, ExperienceFragmentsClient.XF_TEMPLATE template) throws Exception
ExperienceFragmentsClient.VariantComponents
subclass object that can be used to configure the variant components defined in the templateT
- The subclass of ExperienceFragmentsClient.VariantComponents
to which the result should be casted tovariantPath
- the path of the Experience Fragment Varianttemplate
- the template of the Experience Fragment VariantExperienceFragmentsClient.VariantComponents
subclass object that can be used to configure the variant components defined in the templateException
- if the components can not be retrievedCopyright © 2018. All rights reserved.