Package com.adobe.cq.testing.client
Class TogglesClient
- java.lang.Object
-
- org.apache.sling.testing.clients.AbstractSlingClient
-
- org.apache.sling.testing.clients.SlingClient
-
- com.adobe.cq.testing.client.CQClient
-
- com.adobe.cq.testing.client.TogglesClient
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.http.client.HttpClient
public class TogglesClient extends CQClient
CQClient for performing operations related to feature toggles.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.adobe.cq.testing.client.CQClient
CQClient.Builder, CQClient.InternalBuilder<T extends CQClient>
-
-
Field Summary
-
Fields inherited from class com.adobe.cq.testing.client.CQClient
LOG, STATISTICS_ROOT, wcmCommands
-
-
Constructor Summary
Constructors Constructor Description TogglesClient(URI serverUrl, String user, String password)
TogglesClient(org.apache.http.impl.client.CloseableHttpClient http, org.apache.sling.testing.clients.SlingClientConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getEnabledToggles()
Retrieves a list of all the enabled toggles on the instance.boolean
isToggleEnabled(String toggle)
Checks whether a toggle is enabled or not.-
Methods inherited from class com.adobe.cq.testing.client.CQClient
copyLanguages, copyPage, createPage, createPageWithRetry, createVersion, deletePage, deletePageWithRetry, getAuthorSitesPage, lockPage, movePage, movePage, pageExists, pageExistsWithRetry, pageExistsWithRetry, resetPageStatistics, restoreTree, restoreVersion, rolloutPage, searchAndReplaceInPages, searchInPages, setPageProperties, setPageProperty, setPagePropertyImage, unlockPage, uploadFileCQStyle
-
Methods inherited from class org.apache.sling.testing.clients.SlingClient
createFolder, createNode, createNodeRecursive, deletePath, doGetJson, endImpersonation, exists, getJsonNode, getJsonNode, getNodeNameFromPath, getParentPath, getUser, getUUId, getUUID, impersonate, importContent, importContent, importJson, move, setPropertiesString, setPropertyString, setPropertyStringArray, upload, waitExists, waitUntilExists
-
Methods inherited from class org.apache.sling.testing.clients.AbstractSlingClient
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, getValue, getValues, hasValue
-
-
-
-
Method Detail
-
getEnabledToggles
public List<String> getEnabledToggles() throws org.apache.sling.testing.clients.ClientException
Retrieves a list of all the enabled toggles on the instance.- Returns:
- the list of enabled toggles
- Throws:
org.apache.sling.testing.clients.ClientException
- if the toggles state cannot be retrieved
-
isToggleEnabled
public boolean isToggleEnabled(String toggle) throws org.apache.sling.testing.clients.ClientException
Checks whether a toggle is enabled or not.- Parameters:
toggle
- the toggle to check- Returns:
- true if the toggle is enabled
- Throws:
org.apache.sling.testing.clients.ClientException
- if the toggles state cannot be retrieved
-
-