Uses of Class
org.apache.sling.testing.clients.SlingHttpResponse
Packages that use SlingHttpResponse
Package
Description
OSGI testing tools.
-
Uses of SlingHttpResponse in org.apache.sling.testing.clients
Methods in org.apache.sling.testing.clients that return SlingHttpResponseModifier and TypeMethodDescriptionSlingClient.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()
.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.ClientException.getResponse()
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.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.Methods in org.apache.sling.testing.clients with parameters of type SlingHttpResponseModifier and TypeMethodDescriptionvoid
ClientException.setResponse
(SlingHttpResponse response) Set the response associated with this exception or {{null}}Constructors in org.apache.sling.testing.clients with parameters of type SlingHttpResponseModifierConstructorDescriptionClientException
(String message, Throwable throwable, org.apache.http.client.methods.HttpUriRequest request, SlingHttpResponse response) Deprecated.use a constructor of one of the subclasses -
Uses of SlingHttpResponse in org.apache.sling.testing.clients.exceptions
Constructors in org.apache.sling.testing.clients.exceptions with parameters of type SlingHttpResponseModifierConstructorDescriptionTestingIOException
(String message, Throwable throwable, org.apache.http.client.methods.HttpUriRequest request, SlingHttpResponse response) TestingSetupException
(String message, Throwable throwable, org.apache.http.client.methods.HttpUriRequest request, SlingHttpResponse response) TestingValidationException
(String message, Throwable throwable, org.apache.http.client.methods.HttpUriRequest request, SlingHttpResponse response) -
Uses of SlingHttpResponse in org.apache.sling.testing.clients.osgi
Methods in org.apache.sling.testing.clients.osgi that return SlingHttpResponseModifier and TypeMethodDescriptionOsgiConsoleClient.deleteConfiguration
(String pid, int... expectedStatus) Delete the config referenced by the PIDOsgiConsoleClient.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 levelOsgiConsoleClient.uninstallBundle
(String symbolicName) Uninstall a bundle -
Uses of SlingHttpResponse in org.apache.sling.testing.clients.util
Methods in org.apache.sling.testing.clients.util with parameters of type SlingHttpResponseModifier and TypeMethodDescriptionstatic String
HttpUtils.buildDefaultErrorMessage
(SlingHttpResponse resp) Build default error messagestatic void
HttpUtils.verifyHttpStatus
(SlingHttpResponse response, int... expectedStatus) Verify expected status and dump response in case expected status is not returned.