Uses of Class
org.apache.sling.testing.clients.ClientException
Packages that use ClientException
Package
Description
OSGI testing tools.
Query tools leveraging javax.jcr.query
-
Uses of ClientException in org.apache.sling.testing.clients
Methods in org.apache.sling.testing.clients that throw ClientExceptionModifier and TypeMethodDescriptionSlingClient.Builder.build()
abstract T
SlingClient.InternalBuilder.build()
SlingClientConfig.Builder.build()
protected SlingClientConfig
SlingClient.InternalBuilder.buildSlingClientConfig()
SlingClient.createFolder
(String folderName, String folderTitle, String parentPath, int... expectedStatus) Creates a new Folder of type sling:OrderedFolder.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.SlingClient.createNodeRecursive
(String path, String nodeType) Recursively creates all the none existing nodes in the given path using theSlingClient.createNode(String, String)
method.SlingClient.deletePath
(String path, int... expectedStatus) Deletes a sling path (:operation delete)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.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()
.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()
.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
Returns theJsonNode
object corresponding to a content node.AbstractSlingClient.doHead
(String requestPath, List<org.apache.http.NameValuePair> parameters, List<org.apache.http.Header> headers, int... expectedStatus) Executes a HEAD requestAbstractSlingClient.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.AbstractSlingClient.doPost
(String requestPath, org.apache.http.HttpEntity entity, int... expectedStatus) Executes a POST request and consumes the entity in the response.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.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.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.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.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.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.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
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.SlingClient.getUUId
(com.fasterxml.jackson.databind.JsonNode jsonNode) Get the UUID from a node that was already parsed in aJsonNode
Get the UUID of a repository pathSlingClient.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.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.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 nodeMoves a sling path to a new location (:operation move)SlingClient.setPropertiesString
(String nodePath, List<org.apache.http.NameValuePair> properties, int... expectedStatus) Sets multiple String properties on a node in a single requestSlingClient.setPropertyString
(String nodePath, String propName, String propValue, int... expectedStatus) Sets String component property on a node.SlingClient.setPropertyStringArray
(String nodePath, String propName, List<String> propValueList, int... expectedStatus) Sets a String[] component property on a node.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 ClientExceptionModifierConstructorDescriptionSlingClient
(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 ClientExceptionModifier and TypeMethodDescriptionvoid
SlingEmailClient.deleteMessages()
Deletes all mail messages currently storedint
SlingEmailClient.getBindPort()
Retrieves the actual bind port of the SMTP serverSlingEmailClient.getMessages()
Retrieves the list of mail messages currently storedConstructors in org.apache.sling.testing.clients.email that throw ClientExceptionModifierConstructorDescriptionSlingEmailClient
(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.exceptionsModifier and TypeClassDescriptionclass
Use this exception to indicate any problems with networking (typically manifested as IOException).class
Use this exception to signal problems in the test setup, e.g.class
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 ClientExceptionModifierConstructorDescriptionMicrodataClient
(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 ClientExceptionModifier and TypeMethodDescriptionIndexingClient.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 ClientExceptionModifierConstructorDescriptionIndexingClient
(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 ClientExceptionModifier and TypeMethodDescriptionOsgiConsoleClient.deleteConfiguration
(String pid, int... expectedStatus) Delete the config referenced by the PIDOsgiConsoleClient.editConfiguration
(String PID, String factoryPID, Map<String, Object> configProperties, int... expectedStatus) Sets properties of a config referenced by its PID.OsgiConsoleClient.editConfigurationWithWait
(int waitCount, String PID, String factoryPID, Map<String, Object> configProperties, int... expectedStatus) Return bundle info for a bundle with persistence identifierpid
Return bundle info for a bundle with namename
BundlesInfo.forSymbolicName
(String name) Return bundle info for a bundle with symbolic namename
long
OsgiConsoleClient.getBundleId
(String symbolicName) Get the id of the bundleOsgiConsoleClient.getBundleInfo
(String id, int... expectedStatus) Returns the wrapper for the bundle info jsonOsgiConsoleClient.getBundlesInfo
(int... expectedStatus) Returns the wrapper for the bundles info jsonOsgiConsoleClient.getBundleState
(String symbolicName) Get the state of the bundleOsgiConsoleClient.getBundleVersion
(String symbolicName) Get the version of the bundleOsgiConsoleClient.getComponentInfo
(String id, int expectedStatus) Returns the wrapper for the component info jsonOsgiConsoleClient.getComponentsInfo
(int... expectedStatus) Returns the wrapper for the components info jsonOsgiConsoleClient.getConfigPIDFromServices
(String serviceType, String propertyName, String propertyValue, long timeout, long delay) Performs a search of a config PID through the service information.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.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.OsgiConsoleClient.installBundle
(File f, boolean startBundle) Install a bundle using the Felix webconsole HTTP interfaceOsgiConsoleClient.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 bundleOsgiConsoleClient.uninstallBundle
(String symbolicName) Uninstall a bundlevoid
BundlesInstaller.uninstallBundles
(List<File> toUninstall) Uninstall a list of bundles supplied as FilesOsgiConsoleClient.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.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 ClientExceptionModifierConstructorDescriptionOsgiConsoleClient
(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 ClientExceptionModifier and TypeMethodDescriptionlong
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) QueryClient.getPlan
(String query, QueryClient.QueryType type) Retrieves the plan of the query.QueryClient.installServlet()
Installs the servlet to be able to perform queries.QueryClient.uninstallServlet()
Deletes all the resources created byQueryClient.installServlet()
Constructors in org.apache.sling.testing.clients.query that throw ClientExceptionModifierConstructorDescriptionQueryClient
(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 ClientExceptionModifierConstructorDescriptionInputStreamBodyWithLength
(String resourcePath, String contentType, String fileName)
SlingClient.waitExists(String, long, long)
andSlingClient.doGetJson(String, int, int...)
instead