* requirements include Integrity.YES, then we must verify
* codebase integrity at this level. If there are any
* non-Integrity unfulfilled requirements, we cannot
* satisfy them, so this request attempt must fail.
*/
InvocationConstraints unfulfilled =
request.getUnfulfilledConstraints();
for (Iterator i = unfulfilled.requirements().iterator();
i.hasNext();)
{
InvocationConstraint c = (InvocationConstraint) i.next();
if (c == Integrity.YES) {
integrity = true;
} else if (!(c instanceof Integrity)) {
throw new UnsupportedConstraintException(
"cannot satisfy unfulfilled constraint: " + c);
}
// REMIND: support ConstraintAlternatives containing Integrity?
}
/*
* Even if Integrity.YES wasn't a requirement, we will
* satisfy a preference for it.
*/
if (!integrity) {
for (Iterator i = unfulfilled.preferences().iterator();
i.hasNext();)
{
InvocationConstraint c = (InvocationConstraint) i.next();
if (c == Integrity.YES) {
integrity = true;