updateDTOs();
}
private void validateDTOs() throws ValidationException {
for (CriterionSatisfactionDTO satisfactionDTO : getWithCriterionAssignedDTOs()) {
Criterion criterion = satisfactionDTO.getCriterionWithItsType()
.getCriterion();
if (checkSameCriterionAndSameInterval(satisfactionDTO)) {
throw new IllegalStateException(
_("The {0} can not be assigned to this resource. Its interval overlaps with other criterion",
criterion.getName()));
}
if (checkNotAllowSimultaneousCriterionsPerResource(satisfactionDTO)) {
throw new IllegalStateException(
_("The {0} is not valid. Other value exists from the same criterion type",
criterion.getName()));
}
}
}