use of com.developmentontheedge.beans.model.ComponentModel in project be5 by DevelopmentOnTheEdge.
the class BeModelElementSupport method mergeThis.
protected void mergeThis(BeModelElement other, boolean inherit) {
if (inherit) {
this.prototype = other;
} else {
this.prototype = null;
Set<String> customizableProperties = new HashSet<>(getCustomizableProperties());
customizableProperties.removeAll(getCustomizedProperties());
for (String customizableProperty : customizableProperties) {
try {
Object value = Beans.getBeanPropertyValue(other, customizableProperty);
ComponentModel info = ComponentFactory.getModel(this, ComponentFactory.Policy.DEFAULT);
Property property = info.findProperty(customizableProperty);
if (property != null) {
if (!customizableProperty.equals("roles")) {
property.setValue(value);
}
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
}
Aggregations