Class Carousel
java.lang.Object
com.adobe.cq.testing.client.components.AbstractComponent
com.adobe.cq.testing.client.components.foundation.AbstractFoundationComponent
com.adobe.cq.testing.client.components.foundation.Carousel
Wraps the Carousel foundation component, providing methods for editing it. See
/libs/foundation/components/carousel
in the repository for implementation details.-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class com.adobe.cq.testing.client.components.AbstractComponent
changeProperties, client, componentPath, DEFAULT_LOCATION, jsonNode, location, pagePath
-
Constructor Summary
ConstructorDescriptionCarousel
(ComponentClient client, String pagePath, String location, String nameHint) The constructor stores all the component path information like parentPage, name etc. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.sling.testing.clients.SlingHttpResponse
edit
(int playSpeed, int transTime, String controlsType, String listFrom, String orderBy, int limit, String parentPage, String[] fixedList, String searchIn, String query, String savedQuery, int... expectedStatus) Sends an editing request to a carousel component.org.apache.sling.testing.clients.util.FormEntityBuilder
getCreateFormEntity
(String order) Adds an additional parameterparentResourceType
to get properly inherited styles.The resource type for the component, e.g.Methods inherited from class com.adobe.cq.testing.client.components.AbstractComponent
create, getClient, getComponentNode, getComponentPath, getFirstChild, getLocation, getName, getNext, getNextNodePath, getPagePath, getParentPath, getPrevious, getPreviousNodePath, getProperty, getPropertyAsString, getPropertyAsStringArray, reorder, save, setProperty, setProperty
-
Field Details
-
RESOURCE_TYPE
- See Also:
-
PROP_PLAY_SPEED
- See Also:
-
PROP_TRANS_TIME
- See Also:
-
PROP_CONTROLS_TYPE
- See Also:
-
PROP_LIST_FROM
- See Also:
-
PROP_ORDER_BY
- See Also:
-
PROP_LIMIT
- See Also:
-
PROP_PARENT_PAGE
- See Also:
-
PROP_PAGES
- See Also:
-
PROP_SEARCH_IN
- See Also:
-
PROP_QUERY
- See Also:
-
PROP_SAVED_QUERY
- See Also:
-
-
Constructor Details
-
Carousel
The constructor stores all the component path information like parentPage, name etc.- Parameters:
client
- The ComponentClient that will be used for sending the requests.pagePath
- path to the page that will contain the component.location
- relative location to the parent node inside the page that will contain the component node.nameHint
- name to be used for the component node. Might get altered by the server if a naming conflict occurs. TheAbstractComponent.getName()
method will return the correct name afterAbstractComponent.create(String,int...)
has been called.
-
-
Method Details
-
getCreateFormEntity
Adds an additional parameterparentResourceType
to get properly inherited styles.- Overrides:
getCreateFormEntity
in classAbstractComponent
- Parameters:
order
- order- Returns:
- FormEntityBuilder to be used for the create POST request.
-
getResourceType
Description copied from class:AbstractComponent
The resource type for the component, e.g. foundation/components/text. this will be set in thesling:resourceType
property of the node.- Specified by:
getResourceType
in classAbstractComponent
- Returns:
- the resource type
-
edit
public org.apache.sling.testing.clients.SlingHttpResponse edit(int playSpeed, int transTime, String controlsType, String listFrom, String orderBy, int limit, String parentPage, String[] fixedList, String searchIn, String query, String savedQuery, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException Sends an editing request to a carousel component.- Parameters:
playSpeed
- Time in milliseconds until the next slide is shown. Set 0 to not change.transTime
- Time in milliseconds for a transition between 2 slides. Set 0 to not change.controlsType
- Allowed values:
- pn (prev next)
- tl (top left)
- tc (top center)
- tr (top right)
- bl (bottom left)
- bc (bottom center)
- br (bottom right)
listFrom
- Allowed values:
- children (Child Pages)
- static (Fixed List)
- search (Search)
- querybuilder (Advanced Search)
orderBy
- Allowed values:
- jcr:title
- jcr:created
- cq:lastModified
- cq:template
limit
- Maximum number of items displayed in list, set 0 to ignore.parentPage
- If listFrom = children, defines the parent page.Set null to use current page.fixedList
- If listFrom = static, set String array of pages that should doGet shown in carousel.searchIn
- If listFrom = search, where to start search, Set null to use current site (eg. /content/mysite)query
- If listFrom = search, the search query to execute.savedQuery
- If listFrom = querybuilder, the querybuilder predicate notation.expectedStatus
- list of allowed HTTP Status to be returned. if not set, status 200 is assumed- Returns:
- a
SlingHttpResponse
wrapping the HTML response returned by Sling - Throws:
org.apache.sling.testing.clients.ClientException
- If something fails during request/response cycle
-