});
final String[] params = getRealParametersFromXML();
final Map<String, String> parameters =
new LinkedHashMap<String, String>();
for (final String param : params) {
final Value value = getComboBoxValue(param);
if (DiskData.TYPE.equals(param)) {
parameters.put(param, value.getValueForConfig());
} else if (DiskData.TARGET_BUS_TYPE.equals(param)) {
if (value == null || value.getValueForConfig() == null) {
parameters.put(DiskData.TARGET_BUS, null);
parameters.put(DiskData.TARGET_TYPE, null);
} else {
final String[] values = value.getValueForConfig().split("/");
if (values.length == 2) {
parameters.put(DiskData.TARGET_BUS, values[0]);
parameters.put(DiskData.TARGET_TYPE, values[1]);
} else {
LOG.appWarning("getHWParameters: cannot parse: " + param + " = " + value);
}
}
} else if (allParams) {
if (Tools.areEqual(getParamDefault(param), value)) {
parameters.put(param, null);
} else {
parameters.put(param, value.getValueForConfig());
}
} else if (!Tools.areEqual(getParamSaved(param), value)
|| DiskData.SOURCE_FILE.equals(param)
|| DiskData.SOURCE_DEVICE.equals(param)
|| DiskData.SOURCE_PROTOCOL.equals(param)
|| DiskData.SOURCE_NAME.equals(param)
|| DiskData.SOURCE_HOST_NAME.equals(param)
|| DiskData.SOURCE_HOST_PORT.equals(param)
|| DiskData.AUTH_USERNAME.equals(param)
|| DiskData.AUTH_SECRET_TYPE.equals(param)
|| DiskData.AUTH_SECRET_UUID.equals(param)) {
if (Tools.areEqual(getParamDefault(param), value)) {
parameters.put(param, null);
} else {
parameters.put(param, value.getValueForConfig());
}
}
}
parameters.put(DiskData.SAVED_TARGET_DEVICE, getName());
setName(getParamSavedForConfig(DiskData.TARGET_DEVICE));