Obtains the configuration of a component from the Jenkins CI server

 @param [String] url_prefix The prefix to be used in the URL

 @return [String] XML configuration obtained from Jenkins
162724
def get_config(url_prefix)
      request = Net::HTTP::Get.new("#{@jenkins_path}#{url_prefix}/config.xml")
      @logger.debug "GET #{url_prefix}/config.xml"
      response = make_http_request(request)
      handle_exception(response, "body")
    end
148846
def to_xml
      builder = Builder::XmlMarkup.new
      builder.instruct!
      xml = builder.notice(:version => Airbrake::API_VERSION) do |notice|
        notice.tag!("api-key", api_key)
        notice.notifier do |notifier|
          notifier.name(notifier_name)
          notifier.version(notifier_version)
          notifier.url(notifier_url)
        end
        notice.error do |error|
          error.tag!('class', error_class)
          error.message(error_message)
          error.backtrace do |backtrace|
            self.backtrace.lines.each do |line|
              backtrace.line(:number => line.number,
                             :file   => line.file,
                             :method => line.method)
            end
          end
        end
        if url ||
            controller ||
            action ||
            !parameters.blank? ||
            !cgi_data.blank? ||
            !session_data.blank?
          notice.request do |request|
            request.url(url)
            request.component(controller)
            request.action(action)
            unless parameters.nil? || parameters.empty?
              request.params do |params|
                xml_vars_for(params, parameters)
              end
            end
            unless session_data.nil? || session_data.empty?
              request.session do |session|
                xml_vars_for(session, session_data)
              end
            end
            unless cgi_data.nil? || cgi_data.empty?
              request.tag!("cgi-data") do |cgi_datum|
                xml_vars_for(cgi_datum, cgi_data)
              end
            end
          end
        end
        notice.tag!("server-environment") do |env|
          env.tag!("project-root", project_root)
          env.tag!("environment-name", environment_name)
          env.tag!("hostname", hostname)
        end
      end
      xml.to_s
    end
405718
private Map<String, String> getConfigMap(String prefix) {
        Map<String, String> rval = new HashMap<>();
        Iterator<?> keys = config.getKeys(prefix);
        while (keys.hasNext()) {
            String key = String.valueOf(keys.next());
            if (key.equals(prefix)) {
                continue;
            }
            String shortKey = key.substring(prefix.length() + 1);
            rval.put(shortKey, config.getString(key));
        }
        return rval;
    }
106946
public final String getPrefix() {
		if ((prefix == null || prefix.isEmpty()) && (configuration != null)) {
			prefix = configuration.getPrefix();
		}
		return prefix;
	}
933893
def site_url(str = nil)
      url = Setting.get('site_url')
      str = str[1..-1] if !str.blank? && str[0,1] == '/'
      "#{Setting.get('url_prefix')}#{strip_url(url)}/#{str}"
    end
181851
def namespace_for_prefix(self, prefix):
        
        try:
            ni = self.__lookup_prefix(prefix)
        except PrefixNotFoundError:
            return None
        else:
            return ni.uri
286525
function _buildUrl (config, type, multi) {
  let url = config.url
  let language = _getLanguage(config.language)
  let block = multi ? config.blocks[type][language] : config.blocks[type]
  let version = _getVersion(config.version)
  return `${url}${block}?v=${version}&l=${language}`
}
1076983
def main_component_url(component)
      current_params = try(:params) || {}
      EngineRouter.main_proxy(component).root_url(locale: current_params[:locale])
    end
737751
def get_proxy_options(url=nil)
      options = {}
      if url = url || ENV['HTTPS_PROXY'] || ENV['https_proxy'] || ENV['HTTP_PROXY'] || ENV['http_proxy']
        proxy_uri = URI.parse(url)
        options[:http_proxyaddr] = proxy_uri.host
        options[:http_proxyport] = proxy_uri.port
        options[:http_proxyuser] = proxy_uri.user
        options[:http_proxypass] = proxy_uri.password
      end
      options
    end
514450
def get_adapter(self, url):
        
        for (prefix, adapter) in self.adapters.items():

            if url.lower().startswith(prefix.lower()):
                return adapter

        # Nothing matches :-/
        raise InvalidSchema("No connection adapters were found for '%s'" % url)
410272
function(url, properties, headers) {
        headers = headers || {};

        headers['Content-Type'] = 'application/xml; charset=utf-8';

        var body =
            '<?xml version="1.0"?>\n' +
            '<d:propertyupdate ';
        var namespace;
        for (namespace in this.xmlNamespaces) {
            body += ' xmlns:' + this.xmlNamespaces[namespace] + '="' + namespace + '"';
        }
        body += '>\n' + this._renderPropSet(properties);
        body += '</d:propertyupdate>';

        return this.request('PROPPATCH', url, headers, body).then(
            function(result) {
                return {
                    status: result.status,
                    body: result.body,
                    xhr: result.xhr
                };
            }.bind(this)
        );

    }
1275845
def server_and_prefix(self):
        """"""
        return(host_port_prefix(self.config.host, self.config.port, self.prefix))
309563
private static URL getConfigUrl() throws ConfigurationException {
        String spec = System.getProperty(CONFIG_URL_PROPERTY_NAME);
        if (spec == null) {
            spec = DEFAULT_CONFIG_URL;
        }

        URL configUrl = null;
        try {
            configUrl = new URL(spec);
            configUrl.openStream().close(); // catches well-formed but bogus URLs
        } catch (Exception e) {
            try {
                File f = new File(spec);
                if (f.exists()) {
                    configUrl = new URL("file:///" + f.getCanonicalPath());
                }
            } catch( Exception ex) {
            }
        }

        if (configUrl == null) {
            ClassLoader loader = ServerParams.class.getClassLoader();
            configUrl = loader.getResource(spec);

            if (configUrl == null) {
                throw new ConfigurationException("Can't find file/resource: \"" + spec + "\".");
            }
        }

        return configUrl;
    }
177863
def _get_xml_rpc():
    '''
    
    '''
    vm_ = get_configured_provider()

    xml_rpc = config.get_cloud_config_value(
        'xml_rpc', vm_, __opts__, search_global=False
    )

    user = config.get_cloud_config_value(
        'user', vm_, __opts__, search_global=False
    )

    password = config.get_cloud_config_value(
        'password', vm_, __opts__, search_global=False
    )

    server = salt.ext.six.moves.xmlrpc_client.ServerProxy(xml_rpc)

    return server, user, password
55108
protected XmlFile getConfigXml() {
        return new XmlFile(Jenkins.XSTREAM,
                new File(Jenkins.getInstance().getRootDir(),wrapper.getShortName()+".xml"));
    }
570028
function get_config_xml(jobName, customParams, callback) {
      var _doArgs25 = doArgs(arguments, ['string', ['object', {}], 'function']);

      var _doArgs26 = _slicedToArray(_doArgs25, 3);

      jobName = _doArgs26[0];
      customParams = _doArgs26[1];
      callback = _doArgs26[2];


      doRequest({
        urlPattern: [JOB_CONFIG, jobName],
        noparse: true
      }, customParams, function (error, data) {
        // Get only the XML response body
        if (error) {
          callback(error, data);
        } else {
          callback(null, data.body);
        }
      });
    }
630726
def _get_xml(self, *args, **kwargs):
        
        req = self.session_xml.get(*args, **kwargs)
        return req