parent
302cc95caa
commit
7ee546afb2
2 changed files with 13 additions and 2 deletions
|
|
@ -355,6 +355,18 @@ public class Criterion extends IntegrationEntity implements ICriterion {
|
|||
return false;
|
||||
}
|
||||
|
||||
public boolean includes(Criterion other) {
|
||||
if (isEquivalent(other)) {
|
||||
return true;
|
||||
}
|
||||
for (Criterion each : this.getChildren()) {
|
||||
if (each.includes(other)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@AssertTrue(message="a disabled resource has enabled subresources")
|
||||
public boolean checkConstraintActive() {
|
||||
|
||||
|
|
|
|||
|
|
@ -314,8 +314,7 @@ public abstract class Resource extends IntegrationEntity {
|
|||
|
||||
@Override
|
||||
public boolean accepts(CriterionSatisfaction satisfaction) {
|
||||
return satisfaction.getCriterion()
|
||||
.isEquivalentOrIncludedIn(criterion);
|
||||
return criterion.includes(satisfaction.getCriterion());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue