|
10 | 10 | import java.util.stream.Collectors;
|
11 | 11 | import org.hypertrace.config.objectstore.ConfigObject;
|
12 | 12 | import org.hypertrace.config.objectstore.IdentifiedObjectStore;
|
| 13 | +import org.hypertrace.config.objectstore.IdentifiedObjectStoreWithFilter; |
13 | 14 | import org.hypertrace.config.service.change.event.api.ConfigChangeEventGenerator;
|
14 | 15 | import org.hypertrace.config.service.v1.ConfigServiceGrpc;
|
15 | 16 | import org.hypertrace.config.service.v1.ConfigServiceGrpc.ConfigServiceBlockingStub;
|
|
20 | 21 | import org.hypertrace.label.application.rule.config.service.v1.CreateLabelApplicationRuleResponse;
|
21 | 22 | import org.hypertrace.label.application.rule.config.service.v1.DeleteLabelApplicationRuleRequest;
|
22 | 23 | import org.hypertrace.label.application.rule.config.service.v1.DeleteLabelApplicationRuleResponse;
|
| 24 | +import org.hypertrace.label.application.rule.config.service.v1.GetLabelApplicationRuleFilter; |
23 | 25 | import org.hypertrace.label.application.rule.config.service.v1.GetLabelApplicationRulesRequest;
|
24 | 26 | import org.hypertrace.label.application.rule.config.service.v1.GetLabelApplicationRulesResponse;
|
25 | 27 | import org.hypertrace.label.application.rule.config.service.v1.LabelApplicationRule;
|
|
29 | 31 |
|
30 | 32 | public class LabelApplicationRuleConfigServiceImpl
|
31 | 33 | extends LabelApplicationRuleConfigServiceGrpc.LabelApplicationRuleConfigServiceImplBase {
|
32 |
| - private final IdentifiedObjectStore<LabelApplicationRule> labelApplicationRuleStore; |
| 34 | + private final IdentifiedObjectStoreWithFilter<LabelApplicationRule, GetLabelApplicationRuleFilter> |
| 35 | + labelApplicationRuleStore; |
33 | 36 | private final IdentifiedObjectStore<DeletedSystemLabelApplicationRule>
|
34 | 37 | deletedSystemLabelApplicationRuleStore;
|
35 | 38 | private final LabelApplicationRuleValidator requestValidator;
|
@@ -88,7 +91,7 @@ public void getLabelApplicationRules(
|
88 | 91 | RequestContext requestContext = RequestContext.CURRENT.get();
|
89 | 92 | this.requestValidator.validateOrThrow(requestContext, request);
|
90 | 93 | List<LabelApplicationRule> labelApplicationRules =
|
91 |
| - this.labelApplicationRuleStore.getAllObjects(requestContext).stream() |
| 94 | + this.labelApplicationRuleStore.getAllObjects(requestContext, request.getFilter()).stream() |
92 | 95 | .map(ConfigObject::getData)
|
93 | 96 | .collect(Collectors.toUnmodifiableList());
|
94 | 97 | Set<String> labelApplicationRuleIds =
|
|
0 commit comments