*/
static Map<String, String> loadNameValuePairs(ArquillianDescriptor descriptor, String descriptorQualifier,
String qualifierName) {
String fullDescriptorQualifier = new StringBuilder(descriptorQualifier).append("-").append(qualifierName).toString();
ExtensionDef match = null;
for (ExtensionDef extension : descriptor.getExtensions()) {
if (fullDescriptorQualifier.equals(extension.getExtensionName())) {
Map<String, String> nameValuePairs = extension.getExtensionProperties();
if (log.isLoggable(Level.FINE)) {
log.fine("Using <extension qualifier=\"" + extension.getExtensionName() + "\"> for Drone Configuration");
}
return nameValuePairs;
} else if (descriptorQualifier.equals(extension.getExtensionName())) {
match = extension;
}
}
// found generic only
if (match != null) {
Map<String, String> nameValuePairs = match.getExtensionProperties();
if (log.isLoggable(Level.FINE)) {
log.fine("Using <extension qualifier=\"" + match.getExtensionName() + "\"> for Drone Configuration");
}
return nameValuePairs;
}
return Collections.emptyMap();