String aComponentName) throws Exception {
boolean newParamSetting = false;
Object valueObject = aCPE_nvp.getValue();
String param_name = aCPE_nvp.getName();
// Find in the component in-memory descriptor a parameter with a given name
NameValuePair nvp = findMatchingNameValuePair(aCps, param_name.trim());
if (nvp == null) {
// Parameter setting does not exist in the component's descriptor so create new
newParamSetting = true;
nvp = new NameValuePair_impl();
nvp.setName(param_name);
}
// Override component's parameters based on type
if (aType.equals("String") && valueObject instanceof String[]) {
nvp.setValue(valueObject);
} else if (aType.equals("Integer") && valueObject instanceof Integer[]) {
nvp.setValue(valueObject);
} else if (aType.equals("Float") && valueObject instanceof Float[]) {
nvp.setValue(valueObject);
} else if (aType.equals("Boolean") && valueObject instanceof Boolean[]) {
nvp.setValue(valueObject);
}
if (newParamSetting) {
aCps.setParameterValue(null, nvp.getName(), nvp.getValue());
}
}