} else if ("scope".equals(name)) {
cr.setScope((String)value);
} else if ("type".equals(name)) {
cr.setType((String)value);
} else {
ResourceParams rp =
cr.getNamingResources().findResourceParams(cr.getName());
if (rp != null) {
String valueStr = ""+value;
rp.addParameter(name, valueStr);
cr.getNamingResources().removeResourceParams(cr.getName());
} else {
rp = new ResourceParams();
rp.setName(cr.getName());
String valueStr = ""+value;
rp.addParameter(name, valueStr);
}
cr.getNamingResources().addResourceParams(rp);
}
// cannot use side-efects. It's removed and added back each time