Sling Filter with multiple resource type and specific query parameter in request
Hello,
Below are two points I'm trying to cover via my Sling filter but seems not functional properly.
1. I want my filter to be chained on specific resource types e.g. /apps/a/p1 , /apps/a/p2 , /apps/a/p3
2. I want my filter to be chained only on specific query parameters in request (e.g. https://helloworld.xyz/parent/page-1.html?q=...., https://helloworld.xyz/parent/page-2.html?q=...., https://helloworld.xyz/parent/page-3.html?q=.... )etc.
Below are current state of my filter
1. Filter Scope is of "Request"
2. Tried multiple resource types as below syntax; Assume resource types of page-1 is " /apps/a/p1", resource types of page-2 is " /apps/a/p2" & resource types of page-3 is " /apps/a/p3". Also assume content path of pages are as /content/parent/page-1 etc.
@Component (service = Filter.class, property = {
EngineConstants.SLING_FILTER_SCOPE + "=" + EngineConstants.FILTER_SCOPE_REQUEST,
EngineConstants.SLING_FILTER_METHODS + "=" + "GET",
EngineConstants.SLING_FILTER_EXTENSIONS + "=" + "html",
EngineConstants.SLING_FILTER_PATTERN + "=" + "/content/(parent)/.*",
EngineConstants.SLING_FILTER_RESOURCETYPES + "=['/apps/a/p1','/apps/a/p2',/apps/a/p3']"
})
But I'm unable to register (tried with comma separated values also) and also when i'm using @SlingServletFilter annotation, same issue is taking place.
@SlingServletFilter(scope = { SlingServletFilterScope.REQUEST},
resourceTypes = {"/apps/a/p1","/apps/a/p2","/apps/a/p3"},
pattern = "/content/(parent)/.*",
extensions = {".html"},
methods = {"GET"})