/** * Creates the allow and deny ACI lists based on the provided target match context. These lists * are stored in the evaluation context. * * @param candidates List of all possible ACI candidates. * @param targetMatchCtx Target matching context to use for testing each ACI. */ private void createApplicableList( LinkedList<Aci> candidates, AciTargetMatchContext targetMatchCtx) { LinkedList<Aci> denys = new LinkedList<Aci>(); LinkedList<Aci> allows = new LinkedList<Aci>(); for (Aci aci : candidates) { if (Aci.isApplicable(aci, targetMatchCtx)) { if (aci.hasAccessType(EnumAccessType.DENY)) { denys.add(aci); } if (aci.hasAccessType(EnumAccessType.ALLOW)) { allows.add(aci); } } if (targetMatchCtx.getTargAttrFiltersMatch()) { targetMatchCtx.setTargAttrFiltersMatch(false); } } targetMatchCtx.setAllowList(allows); targetMatchCtx.setDenyList(denys); }