use of org.jboss.galleon.spec.FeatureParameterSpec in project galleon by wildfly.
the class ResolvedFeatureSpec method resolveFeatureId.
ResolvedFeatureId resolveFeatureId(Map<String, String> params) throws ProvisioningException {
if (!xmlSpec.hasId()) {
return null;
}
final List<FeatureParameterSpec> idSpecs = xmlSpec.getIdParams();
if (idSpecs.size() == 1) {
final FeatureParameterSpec idSpec = idSpecs.get(0);
return new ResolvedFeatureId(id, Collections.singletonMap(idSpec.getName(), resolveIdParamValue(params, idSpec)));
}
final Map<String, Object> resolvedParams = new HashMap<>(idSpecs.size());
for (FeatureParameterSpec param : idSpecs) {
resolvedParams.put(param.getName(), resolveIdParamValue(params, param));
}
return new ResolvedFeatureId(id, resolvedParams);
}
Aggregations