use of com.evolveum.midpoint.repo.common.activity.run.buckets.segmentation.content.WorkBucketContentHandler in project midpoint by Evolveum.
the class BucketingManager method narrowQueryForWorkBucket.
/**
* Narrows a query by taking specified bucket into account.
*/
public ObjectQuery narrowQueryForWorkBucket(@NotNull Class<? extends Containerable> type, ObjectQuery query, @NotNull ActivityDistributionDefinition distributionDefinition, @Nullable ItemDefinitionProvider itemDefinitionProvider, @NotNull WorkBucketType workBucket) throws SchemaException {
WorkBucketContentHandler contentHandler = handlerRegistry.getHandler(workBucket.getContent());
AbstractWorkSegmentationType segmentationConfig = BucketingUtil.getWorkSegmentationConfiguration(distributionDefinition.getBuckets());
List<ObjectFilter> conjunctionMembers = new ArrayList<>(contentHandler.createSpecificFilters(workBucket, segmentationConfig, type, itemDefinitionProvider));
return ObjectQueryUtil.addConjunctions(query, beans.prismContext, conjunctionMembers);
}
Aggregations