Class CQConfigManagerClient

java.lang.Object
org.apache.sling.testing.clients.AbstractSlingClient
org.apache.sling.testing.clients.SlingClient
com.adobe.cq.testing.client.CQClient
com.adobe.cq.testing.client.CQConfigManagerClient
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.http.client.HttpClient

public final class CQConfigManagerClient extends CQClient
Client to create configs under the /conf structure. Basic Conf Structure will look similar to this:
 /conf
 ----/confName
          jcr:title
     ----/settings
         ----/configCapability1
         ----/configCapability2
 
A config can be created using create(String title, CQConfigCapability...).
To manipulate existing config use CQConfigManagerClient.CQConfig
  • Constructor Details

    • CQConfigManagerClient

      public CQConfigManagerClient(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
    • CQConfigManagerClient

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

    • create

      public CQConfigManagerClient.CQConfig create(String configTitle, CQConfigManagerClient.CQConfigCapability... capabilities) throws org.apache.sling.testing.clients.ClientException
      Creates a config on default config path /conf
      Parameters:
      configTitle - title of the config to be created
      capabilities - capabilities of the configs eg Editable Templates
      Returns:
      created config
      Throws:
      org.apache.sling.testing.clients.ClientException - if the request fails
    • create

      public CQConfigManagerClient.CQConfig create(String parentPath, String configTitle, CQConfigManagerClient.CQConfigCapability... capabilities) throws org.apache.sling.testing.clients.ClientException
      Creates a CQConfig on the given path
      Parameters:
      parentPath - path below which config should be created
      configTitle - title of the config to be created
      capabilities - capabilities of the configs eg Editable Templates
      Returns:
      created config
      Throws:
      org.apache.sling.testing.clients.ClientException - if the request fails
    • create

      public CQConfigManagerClient.CQConfig create(String parentPath, String configTitle, String configName, CQConfigManagerClient.CQConfigCapability... capabilities) throws org.apache.sling.testing.clients.ClientException
      Created a Config on the given path and with given name
      Parameters:
      parentPath - path below which config should be created
      configTitle - title of the config to be created
      configName - node name for the config
      capabilities - capabilities of the configs eg Editable Templates
      Returns:
      created config
      Throws:
      org.apache.sling.testing.clients.ClientException - if the request fails