final TermMatch matcher = unmatchedTermIterator.next(); for (final Details object : allTerms) { if (matcher.getName() != null && prohibitedTerms.get(matcher.getName()).contains(object)) { continue; if (matcher.isMatch(predicates, namedTerms, isCheckAllPermissions, object, true)) { unmatchedTermIterator.remove(); while (unmatchedTermIterator.hasNext()) { final TermMatch matcher = unmatchedTermIterator.next(); if (matcher.getName() != null && prohibitedTerms.get(matcher.getName()).contains(linkerObject)) { continue; if (matcher.isMatch(predicates, namedTerms, isCheckAllPermissions, linkerObject, true)) { unmatchedTermIterator.remove(); while (unmatchedRelationshipIterator.hasNext()) { final RelationshipMatch matcher = unmatchedRelationshipIterator.next(); final String leftTermName = matcher.leftTerm.getName(); if (leftTermName != null && prohibitedTerms.get(leftTermName).contains(linkerObject)) { continue; while (unmatchedTermIterator.hasNext()) { final TermMatch matcher = unmatchedTermIterator.next(); if (matcher.getName() != null && prohibitedTerms.get(matcher.getName()).contains(linkedObject)) { continue; if (matcher.isMatch(predicates, namedTerms, isCheckAllPermissions, linkedObject, true)) { unmatchedTermIterator.remove();
final TermMatch termMatch = parseTermMatch(graphPathBean, word); termMatches.add(termMatch); if (termMatch.getName() != null) { termsByName.put(termMatch.getName(), termMatch); final RelationshipMatch relationshipMatch = parseRelationshipMatch(graphPathBean, words[0], words[1], words[2]); relationshipMatches.add(relationshipMatch); final String leftTermName = relationshipMatch.leftTerm.getName(); if (leftTermName != null) { termsByName.put(leftTermName, relationshipMatch.leftTerm); final String rightTermName = relationshipMatch.rightTerm.getName(); if (rightTermName != null) { termsByName.put(rightTermName, relationshipMatch.rightTerm); for (final TermMatch term : termsByName.values()) { if (term instanceof NewTermMatch) { final String termName = term.getName(); if (termName != null && termMatchers.put(termName, (NewTermMatch) term) != null) { throw new GraphException("redefined term " + termName + " in rule " + policyRule); final NewTermMatch fullTerm = termMatchers.get(term.getName()); if (fullTerm == null) { throw new GraphException("undefined term " + term.getName() + " in rule " + policyRule);
for (final TermMatch matcher : policyRule.termMatchers) { for (final Details object : allTerms) { if (matcher.isMatch(predicates, namedTerms, isCheckAllPermissions, object, true)) { recordChanges(policyRule, changedObjects, namedTerms, isCheckAllPermissions.booleanValue()); namedTerms.clear();
final MutableBoolean newIsCheckAllPermissions = new MutableBoolean(isCheckAllPermissions.booleanValue()); final boolean isMatch = leftTerm.isMatch(predicates, newNamedTerms, newIsCheckAllPermissions, leftDetails, isRequireNew) && rightTerm.isMatch(predicates, newNamedTerms, newIsCheckAllPermissions, rightDetails, isRequireNew); if (isMatch) { namedTerms.putAll(newNamedTerms);