Skip to content

Commit

Permalink
chore: formatting and reuse existing constants
Browse files Browse the repository at this point in the history
  • Loading branch information
vibe13 committed Nov 27, 2024
1 parent 93233c5 commit e19516c
Showing 1 changed file with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,19 +248,24 @@ public List<V1BaseBeta1RequestRecord> searchRequestRecords(QueryParameters param
});
}

private static final Set<String> ALLOWED_TYPE_KEYS = Set
.of("id", "errata-advisory", "image", "pnc-analysis", "pnc-build", "pnc-operation");
private static final Set<String> ALLOWED_TYPE_KEYS = Set.of(
"id",
ErrataAdvisoryRequestConfig.TYPE_NAME,
ImageRequestConfig.TYPE_NAME,
PncAnalysisRequestConfig.TYPE_NAME,
PncBuildRequestConfig.TYPE_NAME,
PncOperationRequestConfig.TYPE_NAME);

private static final Map<String, Class<? extends RequestConfig>> TYPE_TO_CONFIG_CLASS = Map.of(
"image",
ImageRequestConfig.TYPE_NAME,
ImageRequestConfig.class,
"errata-advisory",
ErrataAdvisoryRequestConfig.TYPE_NAME,
ErrataAdvisoryRequestConfig.class,
"pnc-analysis",
PncAnalysisRequestConfig.TYPE_NAME,
PncAnalysisRequestConfig.class,
"pnc-operation",
PncOperationRequestConfig.TYPE_NAME,
PncOperationRequestConfig.class,
"pnc-build",
PncBuildRequestConfig.TYPE_NAME,
PncBuildRequestConfig.class);

public List<V1Beta1RequestRecord> searchAggregatedResultsNatively(String filter) {
Expand Down

0 comments on commit e19516c

Please sign in to comment.