public List<ItemPath> evaluateUnsatisfierItems() { List<ItemPath> unsatisfiedItems = new ArrayList<>(); if (isAllItems()) { return unsatisfiedItems; } for (ItemPath requiredItem: requiredItems) { if (ItemPathCollectionsUtil.containsEquivalent(getIncludedItems(), requiredItem)) { // allowed continue; } if (!getExcludedItems().isEmpty() && !ItemPathCollectionsUtil.containsEquivalent(getExcludedItems(), requiredItem)) { // not notAllowed = allowed continue; } unsatisfiedItems.add(requiredItem); } return unsatisfiedItems; }
public void removePaths(List<? extends ItemPath> remove) { if (items != null) { for (Iterator<Item<?, ?>> iterator = items.iterator(); iterator.hasNext(); ) { Item<?, ?> item = iterator.next(); ItemPath itemPath = item.getPath().removeIds(); if (ItemPathCollectionsUtil.containsEquivalent(remove, itemPath)) { iterator.remove(); } else if (ItemPathCollectionsUtil.containsSuperpath(remove, itemPath)) { if (item instanceof PrismContainer) { ((PrismContainer<?>) item).getValues().forEach(v -> v.removePaths(remove)); } } } } }
@NotNull public static Set<ItemPath> getFullTextSearchItemPaths(@NotNull FullTextSearchConfigurationType config, Class<? extends ObjectType> clazz) { List<QName> types = ObjectTypes.getObjectType(clazz).thisAndSupertypes().stream() .map(ot -> ot.getTypeQName()) .collect(Collectors.toList()); Set<ItemPath> paths = new HashSet<>(); for (FullTextSearchIndexedItemsConfigurationType indexed : config.getIndexed()) { if (isApplicable(indexed, types)) { for (ItemPathType itemPathType : indexed.getItem()) { ItemPath path = itemPathType.getItemPath(); if (!ItemPath.isEmpty(path) && !ItemPathCollectionsUtil.containsEquivalent(paths, path)) { paths.add(path); } } } } return paths; }
if (extractor.selector.test(filter)) { ItemPath filterPath = extractor.pathExtractor.apply(filter); if (ItemPathCollectionsUtil.containsEquivalent(paths, filterPath)) { filterComponents.addToKnown(filterPath, extractor.valueExtractor.apply(filter), filter); found = true;
public static boolean hasToLoadPath(ItemPath path, Collection<SelectorOptions<GetOperationOptions>> options) { List<SelectorOptions<GetOperationOptions>> retrieveOptions = filterRetrieveOptions(options); if (retrieveOptions.isEmpty()) { return !ItemPathCollectionsUtil.containsEquivalent(PATHS_NOT_RETURNED_BY_DEFAULT, path);