Gets configuration from Arquillian descriptor and creates instance of it.

@param configuration configuration of extension from arquillian.xml
@return this
@throws IllegalArgumentException if {@code configuration} is a null object
175141
public Configuration<T> setConfiguration(Map<String, String> configuration) {
        Validate.notNull(configuration, "Properties for configuration of recorder extension can not be a null object!");
        this.configuration = configuration;
        return this;
    }
120992
private Configuration retrieveConfig(NestedConfigHelper configHelper, ConfigurationAdmin configAdmin) throws InitWithoutConfig {
        if (configHelper == null)
            throw new InitWithoutConfig("Configuration not found");
        // We need configAdmin to list the configurations of nested classloader elements with this application as their parent
        if (configAdmin == null)
            throw new InitWithoutConfig("ConfigurationAdmin service not found");

        String parentPid = (String) configHelper.get(Constants.SERVICE_PID);
        String sourcePid = (String) configHelper.get("ibm.extends.source.pid");
        if (sourcePid != null) {
            parentPid = sourcePid;
        }
        try {
            StringBuilder filter = new StringBuilder();
            filter.append("(&");
            filter.append(FilterUtils.createPropertyFilter("service.factoryPid", "com.ibm.ws.classloading.classloader"));
            filter.append(FilterUtils.createPropertyFilter("config.parentPID", parentPid));
            filter.append(")");
            Configuration[] configs = configAdmin.listConfigurations(filter.toString());
            if (configs == null || configs.length != 1) {
                throw new InitWithoutConfig("No classloader element found");
            }
            Configuration config = configs[0];
            if (config.getProperties() == null) {
                if (tc.isErrorEnabled())
                    Tr.error(tc, "cls.classloader.missing", config.getPid());
                config.delete();
                throw new InitWithoutConfig("Classloader config not found");
            }
            return config;
        } catch (IOException e) {
            throw new InitWithoutConfig("Configuration for classloader not found, exception " + e);
        } catch (InvalidSyntaxException e) {
            throw new InitWithoutConfig("Configuration for classloader not found, exception " + e);
        }
    }
1216198
public ServiceCall<Configuration> getConfiguration(GetConfigurationOptions getConfigurationOptions) {
    Validator.notNull(getConfigurationOptions, "getConfigurationOptions cannot be null");
    String[] pathSegments = { "v1/environments", "configurations" };
    String[] pathParameters = { getConfigurationOptions.environmentId(), getConfigurationOptions.configurationId() };
    RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments,
        pathParameters));
    builder.query("version", versionDate);
    Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "getConfiguration");
    for (Entry<String, String> header : sdkHeaders.entrySet()) {
      builder.header(header.getKey(), header.getValue());
    }
    builder.header("Accept", "application/json");
    return createServiceCall(builder.build(), ResponseConverterUtils.getObject(Configuration.class));
  }
538990
public Document generateXml(I_CmsXmlConfiguration configuration) {

        // create a new document
        Document result = DocumentHelper.createDocument();

        // set the document type
        DOMDocumentType docType = new DOMDocumentType();
        docType.setElementName(N_ROOT);
        docType.setSystemID(configuration.getDtdUrlPrefix() + configuration.getDtdFilename());
        result.setDocType(docType);

        Element root = result.addElement(N_ROOT);
        // start the XML generation
        configuration.generateXml(root);

        // return the resulting document
        return result;
    }
1148934
public static MavenPluginGeneratedConfigOption mavenConfiguration( String url )
    {
        validateNotEmpty( url, "specified configuration url must not be empty " );
        try
        {
            return mavenConfiguration( new URL( url ) );
        } catch( MalformedURLException mE )
        {
            throw new IllegalArgumentException( "url " + url + " is not a valid url", mE );
        }
    }
23754
@Override
  public ConfigurationParser get() {
    try {
      ConfigurationParser parser = parserConstructor.newInstance();
      parser.setConfigurationClasses(configurationClasses);
      parser.setEnvironment(System.getProperty("com.meltmedia.cadmium.environment"));
      return parser;
    } catch (Exception e) {
      logger.error("Failed to create a new ConfigurationParser Instance.", e);
      throw new RuntimeException("Failed to create a new ConfigurationParser Instance.");
    }
  }
307424
protected org.apache.commons.configuration.Configuration getApplicationConfiguration() {
        try {
            return ApplicationProperties.get();
        } catch (AtlasException e) {
            LOG.warn("Error reading application configuration", e);
        }
        return null;
    }
626028
public String resolve( Map<String, String> configuration )
    {
        StringBuilder buffer = new StringBuilder();
        append( buffer, configuration, null );
        return buffer.toString();
    }
53547
public Configuration getConfiguration() {
		if (configuration == null) {
			try {
				configuration = new PropertiesConfiguration(getClass().getResource("/nextserver.properties"));
			} catch (ConfigurationException e) {
				throw new RuntimeException(e);
			}
		}		
		return configuration;
	}
369861
public static synchronized DocFileFactory getFactory(Configuration configuration) {
        DocFileFactory f = configuration.docFileFactory;
        if (f == null) {
            JavaFileManager fm = configuration.getFileManager();
            if (fm instanceof StandardJavaFileManager) {
                f = new StandardDocFileFactory(configuration);
            } else {
                throw new IllegalStateException();
            }
            configuration.docFileFactory = f;
        }
        return f;
    }
43959
@NotNull
    @ObjectiveCName("addEndpoint:")
    public ConfigurationBuilder addEndpoint(@NotNull String url) {
        try {
            endpoints.addEndpoint(url);
        } catch (ConnectionEndpointArray.UnknownSchemeException e) {
            throw new RuntimeException(e.getMessage());
        }
        return this;
    }
515946
protected ConfigurationWrapper getConfigurationWrapper(InjectionPoint injectionPoint) {
		Configuration configuration = injectionPoint.getAnnotated().getAnnotation(Configuration.class);
		return WrapperFactory.wrap(configuration);
	}
224877
public Configuration getConfiguration() {
		final Configuration conf = new Configuration();
		for (Map.Entry<String, String> entry : data.entrySet()) {
			conf.setString(entry.getKey(), entry.getValue());
		}
		return conf;
	}
921613
public Configuration create() {
        Configuration configuration;
        try {
            InputStream stream = null;
            try {
                // Search the user configuration
                stream = Utils.openResourceStream(DEFAULT_USER_CONFIGURATION_FILE);

                // If user configuration not found then use default
                if (stream == null) {
                    stream = Utils.openResourceStream(DEFAULT_CONFIGURATION_FILE);
                }

                if (stream != null) {
                    configuration = create(stream);
                } else {
                    throw new TextProcessorFactoryException("Can't find or open default configuration resource.");
                }
            } finally {
                if (stream != null) {
                    stream.close();
                }
            }

            Properties properties = new Properties();

            // Load properties from .property file
            InputStream propertiesStream = null;
            try {
                propertiesStream = Utils.openResourceStream(DEFAULT_PROPERTIES_FILE);
                if (propertiesStream != null) {
                    properties.load(propertiesStream);
                }
            } finally {
                if (propertiesStream != null) {
                    propertiesStream.close();
                }
            }

            // Load properties from xml file
            InputStream xmlPropertiesStream = null;
            try {
                xmlPropertiesStream = Utils.openResourceStream(DEFAULT_PROPERTIES_XML_FILE);
                if (xmlPropertiesStream != null) {
                    properties.loadFromXML(xmlPropertiesStream);
                }
            } finally {
                if (xmlPropertiesStream != null) {
                    xmlPropertiesStream.close();
                }
            }

            if (!properties.isEmpty()) {
                Map<String, CharSequence> params = new HashMap<String, CharSequence>();
                params.putAll(configuration.getParams());
                for (Map.Entry<Object, Object> entry : properties.entrySet()) {
                    Object key = entry.getKey();
                    if (key != null) {
                        params.put(key.toString(), entry.getValue().toString());
                    }
                }
                configuration.setParams(params);
            }
        } catch (IOException e) {
            throw new TextProcessorFactoryException(e);
        }

        return configuration;
    }
481150
public final BeanConfig getConfig() {
    if (null == config) {
      config = new BeanConfig(getClass().getName());
      doBinding();
    }
    return config;
  }
325733
public final File getJasperCompilation(final Configuration configuration) {
        File jasperCompilation = new File(getWorking(configuration), "jasper-bin");
        createIfMissing(jasperCompilation, "Jasper Compilation");
        return jasperCompilation;
    }
325512
protected List<ISource> locate(ConfigurationWrapper configuration) {
				
		if(configuration == null) {
			throw new IllegalArgumentException("A non-null Configuration annotation must be provided");
		}
		
		// create resolver from configuration annotation's resolver element
		ResolverWrapper resolverWrapper = configuration.resolver();
		PropertyResolver resolver = this.resolverFactory.createPropertyResolver(resolverWrapper);
		Map<Object,Object> bootstrapMap = this.resolverFactory.getBootstrapProperties(resolverWrapper);
		Map<Object,Object> defaultMap = this.resolverFactory.getDefaultProperties(resolverWrapper);
		
		// found sources
		List<ISource> foundSources = new ArrayList<ISource>(0);
		
		// create sources
		List<Source> sources = new ArrayList<Source>(Arrays.asList(configuration.sources()));
		
		// resolve sources as normal
		for(Source source : sources) {
			ISource found = this.resloveSource(source, resolver, bootstrapMap, defaultMap);
			if(found != null) {
				foundSources.add(found);
			}
		}
		
		// fix no sources found, a source SHOULD always be returned
		if(foundSources.isEmpty()) {
			foundSources.add(new UnfoundSource());
		}
		
		return foundSources;
	}