Class BulkEditorClient

    • Constructor Detail

      • BulkEditorClient

        public BulkEditorClient​(org.apache.http.impl.client.CloseableHttpClient http,
                                org.apache.sling.testing.clients.SlingClientConfig config)
                         throws org.apache.sling.testing.clients.ClientException
        Throws:
        org.apache.sling.testing.clients.ClientException
      • BulkEditorClient

        public BulkEditorClient​(URI serverUrl,
                                String user,
                                String password)
                         throws org.apache.sling.testing.clients.ClientException
        Throws:
        org.apache.sling.testing.clients.ClientException
    • Method Detail

      • search

        public com.fasterxml.jackson.databind.JsonNode search​(String rootPath,
                                                              String queryParams,
                                                              String[] cols)
                                                       throws org.apache.sling.testing.clients.ClientException
        Search with bulk editor.
        Parameters:
        rootPath - The search root path.
        queryParams - GQL query parameters.
        cols - List of columns to be displayed.
        Returns:
        Search results.
        Throws:
        org.apache.sling.testing.clients.ClientException - if the request fails
      • importContent

        public org.apache.sling.testing.clients.SlingHttpResponse importContent​(String rootPath,
                                                                                String fileName,
                                                                                String resourceFile,
                                                                                int... expectedStatus)
                                                                         throws org.apache.sling.testing.clients.ClientException
        Import content from a TSV file.
        Overrides:
        importContent in class org.apache.sling.testing.clients.SlingClient
        Parameters:
        rootPath - where to import
        fileName - the file to import
        resourceFile - resource file
        expectedStatus - list of expected http status codes
        Returns:
        the http response
        Throws:
        org.apache.sling.testing.clients.ClientException - if the request fails
      • importContent

        public org.apache.sling.testing.clients.SlingHttpResponse importContent​(String rootPath,
                                                                                String fileName,
                                                                                InputStream inputStream,
                                                                                int... expectedStatus)
                                                                         throws org.apache.sling.testing.clients.ClientException
        Import content from a TSV file.
        Parameters:
        rootPath - where to import
        fileName - the file name
        inputStream - the document input stream
        expectedStatus - list of expected http status codes
        Returns:
        the http response
        Throws:
        org.apache.sling.testing.clients.ClientException - if the request fails
      • exportContent

        public String exportContent​(String rootPath,
                                    String queryParams,
                                    String[] cols)
                             throws org.apache.sling.testing.clients.ClientException
        Export content to TSV file.
        Parameters:
        rootPath - Content root path.
        queryParams - GQL query parameters.
        cols - List of columns to be exported.
        Returns:
        File content.
        Throws:
        org.apache.sling.testing.clients.ClientException - if the request fails
      • changePropertyValue

        public org.apache.sling.testing.clients.SlingHttpResponse changePropertyValue​(String nodePath,
                                                                                      String newValue,
                                                                                      int... expectedStatus)
                                                                               throws org.apache.sling.testing.clients.ClientException
        Update property value.
        Parameters:
        nodePath - The path to the property.
        newValue - The value for the property.
        expectedStatus - list of expected http status codes
        Returns:
        the response
        Throws:
        org.apache.sling.testing.clients.ClientException - if the request fails