[ https://issues.apache.org/jira/browse/SLING-12739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18004638#comment-18004638 ]
Konrad Windszus commented on SLING-12739: ----------------------------------------- Sorry for being late to the game: I do have a concern with using a generic service interface like java.util.function.predicate in OSGi because it is a) very generic b) uses generics :-) a) leads to the fact that for example AEM already registers quite a lot of Predicate services already (so filtering may take a bit). b) leads to the fact that one cannot easily see if a predicate is really suitable for a given type. I have seen predicates on Nodes and Strings. The one choosen for Sling uses String, while IMHO Resource would be the better target to filter on (as that would allow to also consider resource metadata apart from the path). Also the name `sling.servlet.resolver.resource.hiding` rather seems to indicate a Predicate on a Resource than a String. I would actually prefer to come up with a dedicated (functional) interface for Resource predicates and define name values for different usage scenarios as constants of that interface (right now only being “sling.servlet.resolver.resource.hiding” for the servlet resolver use case) and reference only those services within Sling Servlet Resolver. WDYT [~bdelacretaz] > Allow for selectively hiding scripts and servlets from the Sling resolver > ------------------------------------------------------------------------- > > Key: SLING-12739 > URL: https://issues.apache.org/jira/browse/SLING-12739 > Project: Sling > Issue Type: Improvement > Components: Servlets > Affects Versions: Servlets Resolver 2.11.8 > Reporter: Bertrand Delacretaz > Assignee: Bertrand Delacretaz > Priority: Minor > Fix For: Servlets Resolver 2.11.10 > > > I'm working on a gradual deprecation mechanism where scripts and servlets > need to be selectively hidden from the Sling servlets resolution. > The goal is to be able to tentatively disable scripts and servlets, while > keeping their code in the Sling application, so that those disabling changes > can be reverted quickly should the need arise. > -- This message was sent by Atlassian Jira (v8.20.10#820010)