public String getUrl() {
   if (null != port) {
     return root + port.getPort() + tail;
   } else {
     return url.getUrl() + tail;
   }
 }
 protected Integer getBasePort() {
   return Integer.parseInt(System.getProperty(BASE_PORT.getSystemProperty()));
 }
  protected Option[] configureConfigurationPorts() throws URISyntaxException, IOException {
    return options(
        editConfigurationFilePut("etc/system.properties", "urlScheme", "https"),
        editConfigurationFilePut("etc/system.properties", "host", "localhost"),
        editConfigurationFilePut("etc/system.properties", "jetty.port", HTTPS_PORT.getPort()),
        editConfigurationFilePut("etc/system.properties", "hostContext", "/solr"),
        editConfigurationFilePut("etc/system.properties", "ddf.home", "${karaf.home}"),
        editConfigurationFilePut(
            "etc/users.properties",
            SYSTEM_ADMIN_USER,
            SYSTEM_ADMIN_USER_PASSWORD + ",system-admin"),
        editConfigurationFilePut(
            "etc/system.properties", HTTP_PORT.getSystemProperty(), HTTP_PORT.getPort()),
        editConfigurationFilePut(
            "etc/system.properties", HTTPS_PORT.getSystemProperty(), HTTPS_PORT.getPort()),
        editConfigurationFilePut(
            "etc/system.properties", DEFAULT_PORT.getSystemProperty(), DEFAULT_PORT.getPort()),
        editConfigurationFilePut(
            "etc/system.properties", BASE_PORT.getSystemProperty(), BASE_PORT.getPort()),

        // DDF-1572: Disables the periodic backups of .bundlefile. In itests, having those
        // backups serves no purpose and it appears that intermittent failures have occurred
        // when the background thread attempts to create the backup before the exam bundle
        // is completely exploded.
        editConfigurationFilePut(
            "etc/system.properties", "eclipse.enableStateSaver", Boolean.FALSE.toString()),
        editConfigurationFilePut("etc/org.apache.karaf.shell.cfg", "sshPort", SSH_PORT.getPort()),
        editConfigurationFilePut("etc/ddf.platform.config.cfg", "port", HTTPS_PORT.getPort()),
        editConfigurationFilePut("etc/ddf.platform.config.cfg", "host", "localhost"),
        editConfigurationFilePut(
            "etc/org.ops4j.pax.web.cfg", "org.osgi.service.http.port", HTTP_PORT.getPort()),
        editConfigurationFilePut(
            "etc/org.ops4j.pax.web.cfg", "org.osgi.service.http.port.secure", HTTPS_PORT.getPort()),
        editConfigurationFilePut(
            "etc/org.apache.karaf.management.cfg", "rmiRegistryPort", RMI_REG_PORT.getPort()),
        editConfigurationFilePut(
            "etc/org.apache.karaf.management.cfg", "rmiServerPort", RMI_SERVER_PORT.getPort()),
        installStartupFile(
            getClass().getClassLoader().getResourceAsStream("hazelcast.xml"), "/etc/hazelcast.xml"),
        installStartupFile(
            getClass()
                .getClassLoader()
                .getResourceAsStream("ddf.security.sts.client.configuration.config"),
            "/etc/ddf.security.sts.client.configuration.config"),
        KarafDistributionOption.editConfigurationFilePut(
            "etc/ddf.security.sts.client.configuration.config",
            "address",
            "\""
                + SECURE_ROOT
                + HTTPS_PORT.getPort()
                + "/services/SecurityTokenService?wsdl"
                + "\""),
        installStartupFile(
            getClass()
                .getClassLoader()
                .getResourceAsStream("ddf.catalog.solr.external.SolrHttpCatalogProvider.config"),
            "/etc/ddf.catalog.solr.external.SolrHttpCatalogProvider.config"));
  }