public class VersioningClient extends CQClient
CQClient.Builder, CQClient.InternalBuilder<T extends CQClient>LOG, STATISTICS_ROOT, wcmCommands| Constructor and Description |
|---|
VersioningClient(org.apache.http.impl.client.CloseableHttpClient http,
org.apache.sling.testing.clients.SlingClientConfig config) |
VersioningClient(URI serverUrl,
String user,
String password) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.sling.testing.clients.SlingHttpResponse |
createAssetVersion(String assetLocation,
String versionLabel,
String versionComment,
int... expectedStatus)
Creates a new snapshot for the specific asset.
|
org.codehaus.jackson.JsonNode |
getAssetVersions(String assetLocation)
Returns the json node that contains all asset versions.
|
org.codehaus.jackson.JsonNode |
getChildrenPageVersions(String parentPageLocation,
int... expectedStatus)
Returns a json node with all existent versions for the children pages.
|
org.codehaus.jackson.JsonNode |
getPageVersions(String pageLocation,
int... expectedStatus)
Returns an json node with all existent page versions.
|
org.apache.sling.testing.clients.SlingHttpResponse |
getPageWithTimeWrap(String pageLocation,
long date,
int... expectedStatus)
Returns a page from a specific date.
|
org.codehaus.jackson.JsonNode |
getTreeVersions(String path,
Date date,
boolean preserverNVP,
String node,
int... expectedStatus)
Returns an json node with all existent versions of a given tree.
|
long |
getVersionCreationDate(org.codehaus.jackson.JsonNode version)
Returns the version creation date.
|
org.apache.sling.testing.clients.SlingHttpResponse |
restoreAssetVersion(String assetLocation,
String versionId,
int... expectedStatus)
Restores the specific version.
|
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 VersioningClient(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 getAssetVersions(String assetLocation) throws org.apache.sling.testing.clients.ClientException, InterruptedException
assetLocation - Location in repository where the asset is stored.org.apache.sling.testing.clients.ClientException - if the request failsInterruptedException - to mark this method as waitingpublic org.apache.sling.testing.clients.SlingHttpResponse createAssetVersion(String assetLocation, String versionLabel, String versionComment, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
assetLocation - Location in repository where the asset is stored.versionLabel - The snapshot label.versionComment - The snapshot specific comment.expectedStatus - list of expected status list of expected statusorg.apache.sling.testing.clients.ClientException - if the request failspublic org.apache.sling.testing.clients.SlingHttpResponse restoreAssetVersion(String assetLocation, String versionId, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
assetLocation - Location in repository where the asset is stored.versionId - The version's unique id.expectedStatus - list of expected statusorg.apache.sling.testing.clients.ClientException - if the request failspublic org.codehaus.jackson.JsonNode getPageVersions(String pageLocation, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
pageLocation - Location in repository where the page is stored.expectedStatus - list of expected statusorg.apache.sling.testing.clients.ClientException - if the request failspublic org.codehaus.jackson.JsonNode getTreeVersions(String path, Date date, boolean preserverNVP, String node, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
path - Path of the tree rootdate - calendar date to restore topreserverNVP - if true non versionable nodes are preservednode - path to look for inside the tree rootexpectedStatus - list of expected statusorg.apache.sling.testing.clients.ClientException - if the request failspublic org.codehaus.jackson.JsonNode getChildrenPageVersions(String parentPageLocation, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
parentPageLocation - parent pageexpectedStatus - list of expected http status codesorg.apache.sling.testing.clients.ClientException - if the request failspublic long getVersionCreationDate(org.codehaus.jackson.JsonNode version)
throws ParseException
version - The Json node for the specific version.ParseException - if the date is not validpublic org.apache.sling.testing.clients.SlingHttpResponse getPageWithTimeWrap(String pageLocation, long date, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
pageLocation - The path to the requested page.date - The date (in miliseconds) for the requested page.expectedStatus - list of expected http status codesorg.apache.sling.testing.clients.ClientException - if the request failsCopyright © 2018. All rights reserved.