Uses of Class
org.apache.sling.testing.clients.ClientException
-
Packages that use ClientException Package Description org.apache.sling.testing.clients org.apache.sling.testing.clients.email org.apache.sling.testing.clients.exceptions org.apache.sling.testing.clients.html org.apache.sling.testing.clients.indexing org.apache.sling.testing.clients.osgi OSGI testing tools.org.apache.sling.testing.clients.query Query tools leveraging javax.jcr.queryorg.apache.sling.testing.clients.util -
-
Uses of ClientException in org.apache.sling.testing.clients
Methods in org.apache.sling.testing.clients that throw ClientException Modifier and Type Method Description SlingClient
SlingClient.Builder. build()
abstract T
SlingClient.InternalBuilder. build()
SlingClientConfig
SlingClientConfig.Builder. build()
protected SlingClientConfig
SlingClient.InternalBuilder. buildSlingClientConfig()
SlingHttpResponse
SlingClient. createFolder(String folderName, String folderTitle, String parentPath, int... expectedStatus)
Creates a new Folder of type sling:OrderedFolder.SlingHttpResponse
SlingClient. createNode(String path, String nodeType)
Creates the node specified by a given path with the given node type.
If the given node type isnull
, the node will be created with the default type: "sling:OrderedFolder".
If the node already exists, the method will return null, with no errors.
The method ignores trailing slashes so a path like this /a/b/c/// is accepted and will create the c node if the rest of the path exists.SlingHttpResponse
SlingClient. createNodeRecursive(String path, String nodeType)
Recursively creates all the none existing nodes in the given path using theSlingClient.createNode(String, String)
method.SlingHttpResponse
SlingClient. deletePath(String path, int... expectedStatus)
Deletes a sling path (:operation delete)SlingHttpResponse
AbstractSlingClient. doDelete(String requestPath, List<org.apache.http.NameValuePair> parameters, List<org.apache.http.Header> headers, int... expectedStatus)
Executes a DELETE request and consumes the entity in the response.SlingHttpResponse
AbstractSlingClient. doGet(String requestPath, int... expectedStatus)
Executes a GET request and consumes the entity in the response (so the connection is closed immediately) The content is cached and can be retrieved usingresponse.getContent()
.SlingHttpResponse
AbstractSlingClient. doGet(String requestPath, List<org.apache.http.NameValuePair> parameters, int... expectedStatus)
Executes a GET request and consumes the entity in the response (so the connection is closed immediately) The content is cached and can be retrieved usingresponse.getContent()
.SlingHttpResponse
AbstractSlingClient. doGet(String requestPath, List<org.apache.http.NameValuePair> parameters, List<org.apache.http.Header> headers, int... expectedStatus)
Executes a GET request and consumes the entity in the response (so the connection is closed immediately) The content is cached and can be retrieved usingresponse.getContent()
.com.fasterxml.jackson.databind.JsonNode
SlingClient. doGetJson(String path, int depth, int... expectedStatus)
Returns theJsonNode
object corresponding to a content node.SlingHttpResponse
AbstractSlingClient. doHead(String requestPath, List<org.apache.http.NameValuePair> parameters, List<org.apache.http.Header> headers, int... expectedStatus)
Executes a HEAD requestSlingHttpResponse
AbstractSlingClient. doPatch(String requestPath, org.apache.http.HttpEntity entity, List<org.apache.http.Header> headers, int... expectedStatus)
Executes a PATCH request and consumes the entity in the response.SlingHttpResponse
AbstractSlingClient. doPost(String requestPath, org.apache.http.HttpEntity entity, int... expectedStatus)
Executes a POST request and consumes the entity in the response.SlingHttpResponse
AbstractSlingClient. doPost(String requestPath, org.apache.http.HttpEntity entity, List<org.apache.http.Header> headers, int... expectedStatus)
Executes a POST request and consumes the entity in the response.SlingHttpResponse
AbstractSlingClient. doPut(String requestPath, org.apache.http.HttpEntity entity, List<org.apache.http.Header> headers, int... expectedStatus)
Executes a PUT request and consumes the entity in the response.SlingHttpResponse
AbstractSlingClient. doRawRequest(String method, String uri, List<org.apache.http.Header> headers, int... expectedStatus)
Executes a raw HTTP request, WITHOUT consuming the entity in the response.SlingHttpResponse
AbstractSlingClient. doRequest(org.apache.http.client.methods.HttpUriRequest request, List<org.apache.http.Header> headers, int... expectedStatus)
Execute an HTTP request and consumes the entity in the response.SlingHttpResponse
AbstractSlingClient. doStreamGet(String requestPath, List<org.apache.http.NameValuePair> parameters, List<org.apache.http.Header> headers, int... expectedStatus)
Executes a GET request WITHOUT consuming the entity in the response.SlingHttpResponse
AbstractSlingClient. doStreamPost(String requestPath, org.apache.http.HttpEntity entity, List<org.apache.http.Header> headers, int... expectedStatus)
Executes a POST request WITHOUT consuming the entity in the response.SlingHttpResponse
AbstractSlingClient. doStreamRequest(org.apache.http.client.methods.HttpUriRequest request, List<org.apache.http.Header> headers, int... expectedStatus)
Executes an HTTP request, WITHOUT consuming the entity in the response.boolean
SlingClient. exists(String path)
Checks whether a path exists or not by making a GET request to that path with thejson
extensioncom.fasterxml.jackson.databind.JsonNode
SlingClient. getJsonNode(String path, int depth)
Deprecated.com.fasterxml.jackson.databind.JsonNode
SlingClient. getJsonNode(String path, int depth, long waitMillis, int retryNumber, int... expectedStatus)
Deprecated.String
SlingClient. getUUId(com.fasterxml.jackson.databind.JsonNode jsonNode)
Get the UUID from a node that was already parsed in aJsonNode
String
SlingClient. getUUID(String path)
Get the UUID of a repository pathSlingHttpResponse
SlingClient. importContent(String parentPath, String contentType, File contentFile, int... expectedStatus)
Create a tree structure underparentPath
by providing acontentFile
in one of the supported formats: xml, jcr.xml, json, jar, zip.SlingHttpResponse
SlingClient. importContent(String parentPath, String contentType, String content, int... expectedStatus)
Create a tree structure underparentPath
by providing acontent
in one of the supported formats: xml, jcr.xml, json, jar, zip.SlingHttpResponse
SlingClient. importJson(String parentPath, com.fasterxml.jackson.databind.JsonNode json, int... expectedStatus)
Wrapper method overSlingClient.importContent(String, String, String, int...)
for directly importing a json nodeSlingHttpResponse
SlingClient. move(String srcPath, String destPath, int... expectedStatus)
Moves a sling path to a new location (:operation move)SlingHttpResponse
SlingClient. setPropertiesString(String nodePath, List<org.apache.http.NameValuePair> properties, int... expectedStatus)
Sets multiple String properties on a node in a single requestSlingHttpResponse
SlingClient. setPropertyString(String nodePath, String propName, String propValue, int... expectedStatus)
Sets String component property on a node.SlingHttpResponse
SlingClient. setPropertyStringArray(String nodePath, String propName, List<String> propValueList, int... expectedStatus)
Sets a String[] component property on a node.SlingHttpResponse
SlingClient. upload(File file, String mimeType, String toPath, boolean createFolders, int... expectedStatus)
Uploads a file to the repository.Constructors in org.apache.sling.testing.clients that throw ClientException Constructor Description SlingClient(URI url, String user, String password)
Handy constructor easy to use in simple tests.SlingClient(org.apache.http.impl.client.CloseableHttpClient http, SlingClientConfig config)
Constructor used by Builders and adaptTo(). -
Uses of ClientException in org.apache.sling.testing.clients.email
Methods in org.apache.sling.testing.clients.email that throw ClientException Modifier and Type Method Description void
SlingEmailClient. deleteMessages()
Deletes all mail messages currently storedint
SlingEmailClient. getBindPort()
Retrieves the actual bind port of the SMTP serverList<EmailMessage>
SlingEmailClient. getMessages()
Retrieves the list of mail messages currently storedConstructors in org.apache.sling.testing.clients.email that throw ClientException Constructor Description SlingEmailClient(org.apache.http.impl.client.CloseableHttpClient http, SlingClientConfig config)
-
Uses of ClientException in org.apache.sling.testing.clients.exceptions
Subclasses of ClientException in org.apache.sling.testing.clients.exceptions Modifier and Type Class Description class
TestingIOException
Use this exception to indicate any problems with networking (typically manifested as IOException).class
TestingSetupException
Use this exception to signal problems in the test setup, e.g.class
TestingValidationException
Use this exception to indicate any mismatch between expectations and the actual test result. -
Uses of ClientException in org.apache.sling.testing.clients.html
Constructors in org.apache.sling.testing.clients.html that throw ClientException Constructor Description MicrodataClient(URI url, String user, String password)
MicrodataClient(org.apache.http.impl.client.CloseableHttpClient http, SlingClientConfig config)
-
Uses of ClientException in org.apache.sling.testing.clients.indexing
Methods in org.apache.sling.testing.clients.indexing that throw ClientException Modifier and Type Method Description List<String>
IndexingClient. getLaneNames()
Return the list of indexing lanes configured byIndexingClient.setLaneNames(java.lang.String...)
, if any.void
IndexingClient. install()
Creates the necessary custom indices in the repository, if not already present.void
IndexingClient. uninstall()
Deprecated.Use #uninstallWithRetryvoid
IndexingClient. waitForAsyncIndexing()
Same asIndexingClient.waitForAsyncIndexing(long timeout, long delay)
, but with default values fortimeout=1min
anddelay=500ms
.void
IndexingClient. waitForAsyncIndexing(long timeout, long delay)
Blocks until all the async indices are up to date, to guarantee that the susequent queries return all the results.Constructors in org.apache.sling.testing.clients.indexing that throw ClientException Constructor Description IndexingClient(URI url, String user, String password)
Handy constructor easy to use in simple tests.IndexingClient(org.apache.http.impl.client.CloseableHttpClient http, SlingClientConfig config)
Constructor used by Builders and adaptTo(). -
Uses of ClientException in org.apache.sling.testing.clients.osgi
Methods in org.apache.sling.testing.clients.osgi that throw ClientException Modifier and Type Method Description SlingHttpResponse
OsgiConsoleClient. deleteConfiguration(String pid, int... expectedStatus)
Delete the config referenced by the PIDString
OsgiConsoleClient. editConfiguration(String PID, String factoryPID, Map<String,Object> configProperties, int... expectedStatus)
Sets properties of a config referenced by its PID.String
OsgiConsoleClient. editConfigurationWithWait(int waitCount, String PID, String factoryPID, Map<String,Object> configProperties, int... expectedStatus)
BundleInfo
BundlesInfo. forId(String id)
Return bundle info for a bundle with persistence identifierpid
BundleInfo
BundlesInfo. forName(String name)
Return bundle info for a bundle with namename
BundleInfo
BundlesInfo. forSymbolicName(String name)
Return bundle info for a bundle with symbolic namename
long
OsgiConsoleClient. getBundleId(String symbolicName)
Get the id of the bundleBundleInfo
OsgiConsoleClient. getBundleInfo(String id, int... expectedStatus)
Returns the wrapper for the bundle info jsonBundlesInfo
OsgiConsoleClient. getBundlesInfo(int... expectedStatus)
Returns the wrapper for the bundles info jsonString
OsgiConsoleClient. getBundleState(String symbolicName)
Get the state of the bundleString
OsgiConsoleClient. getBundleVersion(String symbolicName)
Get the version of the bundleComponentInfo
OsgiConsoleClient. getComponentInfo(String id, int expectedStatus)
Returns the wrapper for the component info jsonComponentsInfo
OsgiConsoleClient. getComponentsInfo(int... expectedStatus)
Returns the wrapper for the components info jsonMap<String,Object>
OsgiConsoleClient. getConfiguration(String pid, int... expectedStatus)
Returns a map of all properties set for the config referenced by the PID, where the map keys are the property names.Map<String,Object>
OsgiConsoleClient. getOSGiConfiguration(String pid, int... expectedStatus)
Returns a map of all properties set for the config referenced by the PID, where the map keys are the property names.SlingHttpResponse
OsgiConsoleClient. installBundle(File f, boolean startBundle)
Install a bundle using the Felix webconsole HTTP interfaceSlingHttpResponse
OsgiConsoleClient. installBundle(File f, boolean startBundle, int startLevel)
Install a bundle using the Felix webconsole HTTP interface, with a specific start levelvoid
BundlesInstaller. installBundles(List<File> toInstall, boolean startBundles)
Install a list of bundles supplied as Filesboolean
OsgiConsoleClient. installBundleWithRetry(File f, boolean startBundle, int startLevel, int waitTime, int retries)
boolean
BundlesInstaller. isInstalled(File bundleFile)
Checks if a bundle is installed or not.boolean
BundlesInstaller. isInstalledWithSameVersion(File bundleFile)
Check if the installed version matches the one of the bundle (file)void
OsgiConsoleClient. refreshPackages()
Calls PackageAdmin.refreshPackages to force re-wiring of all the bundles.void
OsgiConsoleClient. startBundle(String symbolicName)
Starts a bundlevoid
OsgiConsoleClient. startBundlewithWait(String symbolicName, int waitTime, int retries)
Deprecated.void
OsgiConsoleClient. stopBundle(String symbolicName)
Stop a bundleSlingHttpResponse
OsgiConsoleClient. uninstallBundle(String symbolicName)
Uninstall a bundlevoid
BundlesInstaller. uninstallBundles(List<File> toUninstall)
Uninstall a list of bundles supplied as FilesString
OsgiConsoleClient. waitEditConfiguration(long timeout, String PID, String factoryPID, Map<String,Object> configProperties, int... expectedStatus)
Sets properties of a config referenced by its PID.boolean
BundlesInstaller. waitForBundlesInstalled(List<String> symbolicNames, int timeoutSeconds)
Deprecated.Map<String,Object>
OsgiConsoleClient. waitGetConfiguration(long timeout, String pid, int... expectedStatus)
Returns a map of all properties set for the config referenced by the PID, where the map keys are the property names.void
OsgiConsoleClient. waitInstallBundle(File f, boolean startBundle, int startLevel, long timeout, long delay)
Install a bundle using the Felix webconsole HTTP interface and wait for it to be installed.void
OsgiConsoleClient. waitStartBundle(String symbolicName, long timeout, long delay)
Starts a bundle and waits for it to be startedConstructors in org.apache.sling.testing.clients.osgi that throw ClientException Constructor Description OsgiConsoleClient(URI serverUrl, String userName, String password)
Default constructor.OsgiConsoleClient(org.apache.http.impl.client.CloseableHttpClient http, SlingClientConfig config)
Constructor used by adaptTo() and InternalBuilder classes.OsgiInstanceConfig(T client, String configPID)
-
Uses of ClientException in org.apache.sling.testing.clients.query
Methods in org.apache.sling.testing.clients.query that throw ClientException Modifier and Type Method Description long
QueryClient. doCount(String query, QueryClient.QueryType type)
Executes a query on the server and returns only the number of rows in the resultcom.fasterxml.jackson.databind.JsonNode
QueryClient. doQuery(String query, QueryClient.QueryType type)
Executes a query on the server and returns the results as a jsonprotected com.fasterxml.jackson.databind.JsonNode
QueryClient. doQuery(String query, QueryClient.QueryType type, boolean showResults, boolean explain)
String
QueryClient. getPlan(String query, QueryClient.QueryType type)
Retrieves the plan of the query.QueryClient
QueryClient. installServlet()
Installs the servlet to be able to perform queries.QueryClient
QueryClient. uninstallServlet()
Deletes all the resources created byQueryClient.installServlet()
Constructors in org.apache.sling.testing.clients.query that throw ClientException Constructor Description QueryClient(URI url, String user, String password)
Convenience constructorQueryClient(org.apache.http.impl.client.CloseableHttpClient http, SlingClientConfig config)
Constructor used by adaptTo -
Uses of ClientException in org.apache.sling.testing.clients.util
Constructors in org.apache.sling.testing.clients.util that throw ClientException Constructor Description InputStreamBodyWithLength(String resourcePath, String contentType, String fileName)
-