if (object != null) {
prop.setValue(object);
}
if (field != null) {
getInstanceManager().register(new FieldMetadata(field, type), this);
// Cannot register the property as the interception is necessary
// to deal with registration update.
}
}
// Attach to properties to the provided service
svc.setProperties(properties);
}
Element[] controllers = providedServices[i].getElements("Controller");
if (controllers != null) {
for (int k = 0; k < controllers.length; k++) {
String field = controllers[k].getAttribute("field");
if (field == null) {
throw new ConfigurationException("The field attribute of a controller is mandatory");
}
String v = controllers[k].getAttribute("value");
boolean value = ! (v != null && v.equalsIgnoreCase("false"));
String s = controllers[k].getAttribute("specification");
if (s == null) {
s ="ALL";
}
svc.setController(field, value, s);
getInstanceManager().register(new FieldMetadata(field, "boolean"), this);
}
}
if (checkProvidedService(svc)) {
addProvidedService(svc);