dimas-b commented on code in PR #2434: URL: https://github.com/apache/polaris/pull/2434#discussion_r2304408212
########## runtime/service/src/main/java/org/apache/polaris/service/admin/PolarisCatalogsServiceDefaultDelegator.java: ########## @@ -0,0 +1,176 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.polaris.service.admin; + +import jakarta.decorator.Decorator; +import jakarta.decorator.Delegate; +import jakarta.enterprise.inject.Default; +import jakarta.inject.Inject; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.SecurityContext; +import org.apache.polaris.core.admin.model.AddGrantRequest; +import org.apache.polaris.core.admin.model.CreateCatalogRequest; +import org.apache.polaris.core.admin.model.CreateCatalogRoleRequest; +import org.apache.polaris.core.admin.model.RevokeGrantRequest; +import org.apache.polaris.core.admin.model.UpdateCatalogRequest; +import org.apache.polaris.core.admin.model.UpdateCatalogRoleRequest; +import org.apache.polaris.core.context.RealmContext; +import org.apache.polaris.service.admin.api.PolarisCatalogsApiService; + +@EventsServiceDelegator +@Default +@Decorator Review Comment: Using decorators is an interesting approach. However, AFAIK, decorators are impossible to remove in downstream builds, right? I mean that if a decorator is discovered, it will be applied and all decorators will be applied in priority order. This means that all downstream users or `runtime/service` will always get this decorator in call paths. This is fine, but I believe it might be wise to isolate the decorator in a new module (jar) to allow downstream projects to opt out of it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org