private InstanceSetup()

in src/main/java/org/apache/sling/testing/clients/instance/InstanceSetup.java [54:78]


    private InstanceSetup() {
        final int number = Integer.valueOf(System.getProperty(INSTANCE_CONFIG_INSTANCES, "0"));
        for (int i=1; i<=number; i++ ) {
            URI url;
            try {
                url = new URI(System.getProperty(INSTANCE_CONFIG_URL + String.valueOf(i)));
            } catch (URISyntaxException e) {
                LOG.error("Could not read URL for instance");
                continue;
            }
            final String runmode = System.getProperty(INSTANCE_CONFIG_RUNMODE + String.valueOf(i));
            final String adminUser = System.getProperty(INSTANCE_CONFIG_ADMINUSER + String.valueOf(i));
            final String adminPassword = System.getProperty(INSTANCE_CONFIG_ADMINPASSWORD + String.valueOf(i));

            final InstanceConfiguration qc;
            // Only pass in the admin user name and password if they're both set
            if ((null == adminUser) || (null == adminPassword)) {
                qc = new InstanceConfiguration(url, runmode);
            } else {
                qc = new InstanceConfiguration(url, runmode, adminUser, adminPassword);
            }

            this.configs.add(qc);
        }
    }