use of com.evolveum.midpoint.xml.ns._public.common.common_3.WorkBucketType in project midpoint by Evolveum.
the class FilterWorkBucketContentHandler method createSpecificFilters.
@NotNull
@Override
public List<ObjectFilter> createSpecificFilters(@NotNull WorkBucketType bucket, AbstractWorkSegmentationType configuration, Class<? extends Containerable> type, ItemDefinitionProvider itemDefinitionProvider) throws SchemaException {
FilterWorkBucketContentType content = (FilterWorkBucketContentType) bucket.getContent();
List<ObjectFilter> rv = new ArrayList<>();
for (SearchFilterType filter : content.getFilter()) {
rv.add(prismContext.getQueryConverter().createObjectFilter(type, filter));
}
return rv;
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.WorkBucketType 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