use of org.opennms.features.vaadin.jmxconfiggenerator.ui.mbeans.validation.ValidationResult in project opennms by OpenNMS.
the class MBeansController method validate.
private ValidationResult validate() {
ValidationResult result = validationManager.validate(mbeansContainer);
updateValidState(result);
return result;
}
use of org.opennms.features.vaadin.jmxconfiggenerator.ui.mbeans.validation.ValidationResult in project opennms by OpenNMS.
the class MBeansController method updateValidState.
private void updateValidState(final ValidationResult result) {
Collection<ValidationResult.ValidationError> validationErrors = result.getValidationErrors(Mbean.class);
for (ValidationResult.ValidationError eachError : validationErrors) {
updateValidState(eachError.getErrorObject(), false);
}
validationErrors = result.getValidationErrors(Attrib.class);
for (ValidationResult.ValidationError eachError : validationErrors) {
Mbean parent = (Mbean) attributesContainerCacheMap.get(Attrib.class).getParentFor(eachError.getErrorObject());
updateValidState(parent, false);
}
validationErrors = result.getValidationErrors(CompMember.class);
for (ValidationResult.ValidationError eachError : validationErrors) {
CompAttrib parent = (CompAttrib) attributesContainerCacheMap.get(CompMember.class).getParentFor(eachError.getErrorObject());
updateValidState(parent, false);
}
mbeansTree.markAsDirtyRecursive();
}
Aggregations