public class JsonClient extends CQClient
CQClient which in turn provides a core set of
commonly used website and page functionality.CQClient.Builder, CQClient.InternalBuilder<T extends CQClient>LOG, STATISTICS_ROOT, wcmCommands| Constructor and Description |
|---|
JsonClient(org.apache.http.impl.client.CloseableHttpClient http,
org.apache.sling.testing.clients.SlingClientConfig config) |
JsonClient(URI serverUrl,
String user,
String password) |
| Modifier and Type | Method and Description |
|---|---|
org.codehaus.jackson.JsonNode |
getLanguages(String sitePath,
boolean deep)
Get list of available languages for a page.
|
org.codehaus.jackson.JsonNode |
getMoveReferences(String pagePath,
int... expectedStatus)
Queries the list of page references for a given page, as it is used to
display in the move dialog.
|
org.codehaus.jackson.JsonNode |
getPageReferences(String[] pagePaths)
Get all references used and its status in a given page
In case path is not valid, an empty pages array will be returned |
org.codehaus.jackson.JsonNode |
getPages(String parentPath)
Get children for a given page.
|
org.codehaus.jackson.JsonNode |
getUserGeneratedPages(String ugcBasePath,
int limit,
int start,
String predicate,
String view)
Get user generated pages in the
user generated content (ucg) space,
currently under /content/usergenerated. |
org.codehaus.jackson.JsonNode |
getVersions(String pagePath,
boolean showChildren,
int... expectedStatus)
Get versions for a given page
|
org.codehaus.jackson.JsonNode |
getVersionTree(String pagePath,
String node,
Date date,
int... expectedStatus)
Get version tree for a given page.
|
copyLanguages, copyPage, createPage, createPageWithRetry, createVersion, deletePage, deletePageWithRetry, lockPage, movePage, movePage, resetPageStatistics, restoreTree, restoreVersion, rolloutPage, searchAndReplaceInPages, searchInPages, setPageProperties, setPageProperty, setPagePropertyImage, unlockPage, uploadAsset, uploadFileCQStylecreateFolder, createNode, createNodeRecursive, deletePath, doGetJson, exists, getJsonNode, getJsonNode, getNodeNameFromPath, getParentPath, getUUId, getUUID, importContent, importContent, importJson, move, setPropertiesString, setPropertyString, setPropertyStringArray, upload, waitExists, waitUntilExistsadaptTo, 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, hasValuepublic JsonClient(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.ClientExceptionpublic org.codehaus.jackson.JsonNode getPages(String parentPath) throws org.apache.sling.testing.clients.ClientException
parentPath - parent page to get children fromJsonNodeorg.apache.sling.testing.clients.ClientException - If something fails during request/response cyclepublic org.codehaus.jackson.JsonNode getPageReferences(String[] pagePaths) throws org.apache.sling.testing.clients.ClientException
pagePaths - the page path to get the references forJsonNodeorg.apache.sling.testing.clients.ClientException - If something fails during request/response cyclepublic org.codehaus.jackson.JsonNode getMoveReferences(String pagePath, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
pagePath - the page path to get the references forexpectedStatus - list of allowed HTTP Status to be returned. If not set,
http status 200 (OK) is assumed.JsonNodeorg.apache.sling.testing.clients.ClientException - If something fails during request/response cyclepublic org.codehaus.jackson.JsonNode getLanguages(String sitePath, boolean deep) throws org.apache.sling.testing.clients.ClientException
sitePath - the page path to get the languages fordeep - true if languages' subpages should be part of jsonJsonNodeorg.apache.sling.testing.clients.ClientException - If something fails during request/response cyclepublic org.codehaus.jackson.JsonNode getVersions(String pagePath, boolean showChildren, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
pagePath - the page path to get the versions forshowChildren - true if versions of the children should be includedexpectedStatus - list of allowed HTTP Status to be returned. If not set,
http status 200 (OK) is assumed.JsonNodeorg.apache.sling.testing.clients.ClientException - If something fails during request/response cyclepublic org.codehaus.jackson.JsonNode getVersionTree(String pagePath, String node, Date date, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
pagePath - the page path to get the version tree fornode - the relative path to nodedate - the date which versions should be shown e.g. 2010-01-01T12:00:00+01:00expectedStatus - list of expected http status codesJsonNodeorg.apache.sling.testing.clients.ClientException - If something fails during request/response cyclepublic org.codehaus.jackson.JsonNode getUserGeneratedPages(String ugcBasePath, int limit, int start, String predicate, String view) throws org.apache.sling.testing.clients.ClientException
user generated content (ucg) space,
currently under /content/usergenerated.
ugcBasePath - The base path to start listinglimit - limits the number of nodes below ugcBasePath to be returnedstart - defines the start node below ugcBasePathpredicate - Predicate used to filter hierarchy nodes in the siteadmin e.g. siteadmin (nt:hierarchy- node,
not hidden, no fileview - filter: dependent from moduleJsonNode mapping to the requested content node.org.apache.sling.testing.clients.ClientException - If something fails during request/response cycleCopyright © 2018. All rights reserved.