Package com.adobe.cq.testing.client
Class BulkEditorClient
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.BulkEditorClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.http.client.HttpClient
-
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
Fields inherited from class org.apache.sling.testing.clients.SlingClient
CLIENT_CONNECTION_TIMEOUT_PROP, DEFAULT_NODE_TYPE, SUDO_COOKIE_NAME
-
Constructor Summary
ConstructorDescriptionBulkEditorClient
(URI serverUrl, String user, String password) BulkEditorClient
(org.apache.http.impl.client.CloseableHttpClient http, org.apache.sling.testing.clients.SlingClientConfig config) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.sling.testing.clients.SlingHttpResponse
changePropertyValue
(String nodePath, String newValue, int... expectedStatus) Update property value.exportContent
(String rootPath, String queryParams, String[] cols) Export content to TSV file.org.apache.sling.testing.clients.SlingHttpResponse
importContent
(String rootPath, String fileName, InputStream inputStream, int... expectedStatus) Import content from a TSV file.org.apache.sling.testing.clients.SlingHttpResponse
importContent
(String rootPath, String fileName, String resourceFile, int... expectedStatus) Import content from a TSV file.com.fasterxml.jackson.databind.JsonNode
Search with bulk editor.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, 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
-
Constructor Details
-
BulkEditorClient
public BulkEditorClient(org.apache.http.impl.client.CloseableHttpClient http, org.apache.sling.testing.clients.SlingClientConfig config) throws org.apache.sling.testing.clients.ClientException - Throws:
org.apache.sling.testing.clients.ClientException
-
BulkEditorClient
public BulkEditorClient(URI serverUrl, String user, String password) throws org.apache.sling.testing.clients.ClientException - Throws:
org.apache.sling.testing.clients.ClientException
-
-
Method Details
-
search
public com.fasterxml.jackson.databind.JsonNode search(String rootPath, String queryParams, String[] cols) throws org.apache.sling.testing.clients.ClientException Search with bulk editor.- Parameters:
rootPath
- The search root path.queryParams
- GQL query parameters.cols
- List of columns to be displayed.- Returns:
- Search results.
- Throws:
org.apache.sling.testing.clients.ClientException
- if the request fails
-
importContent
public org.apache.sling.testing.clients.SlingHttpResponse importContent(String rootPath, String fileName, String resourceFile, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException Import content from a TSV file.- Overrides:
importContent
in classorg.apache.sling.testing.clients.SlingClient
- Parameters:
rootPath
- where to importfileName
- the file to importresourceFile
- resource fileexpectedStatus
- list of expected http status codes- Returns:
- the http response
- Throws:
org.apache.sling.testing.clients.ClientException
- if the request fails
-
importContent
public org.apache.sling.testing.clients.SlingHttpResponse importContent(String rootPath, String fileName, InputStream inputStream, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException Import content from a TSV file.- Parameters:
rootPath
- where to importfileName
- the file nameinputStream
- the document input streamexpectedStatus
- list of expected http status codes- Returns:
- the http response
- Throws:
org.apache.sling.testing.clients.ClientException
- if the request fails
-
exportContent
public String exportContent(String rootPath, String queryParams, String[] cols) throws org.apache.sling.testing.clients.ClientException Export content to TSV file.- Parameters:
rootPath
- Content root path.queryParams
- GQL query parameters.cols
- List of columns to be exported.- Returns:
- File content.
- Throws:
org.apache.sling.testing.clients.ClientException
- if the request fails
-
changePropertyValue
public org.apache.sling.testing.clients.SlingHttpResponse changePropertyValue(String nodePath, String newValue, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException Update property value.- Parameters:
nodePath
- The path to the property.newValue
- The value for the property.expectedStatus
- list of expected http status codes- Returns:
- the response
- Throws:
org.apache.sling.testing.clients.ClientException
- if the request fails
-