use of com.evolveum.midpoint.xml.ns._public.common.common_3.FullTextSearchIndexedItemsConfigurationType in project midpoint by Evolveum.
the class FullTextSearchConfigurationUtil method getFullTextSearchItemPaths.
@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.isNullOrEmpty(path) && !ItemPath.containsEquivalent(paths, path)) {
paths.add(path);
}
}
}
}
return paths;
}
Aggregations