[ 
https://issues.apache.org/jira/browse/SLING-7759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16537488#comment-16537488
 ] 

ASF GitHub Bot commented on SLING-7759:
---------------------------------------

kwin commented on a change in pull request #1: SLING-7759 add new patterns to 
filter annotation
URL: 
https://github.com/apache/sling-org-apache-sling-servlets-annotations/pull/1#discussion_r201127409
 
 

 ##########
 File path: 
src/main/java/org/apache/sling/servlets/annotations/SlingServletFilter.java
 ##########
 @@ -43,21 +43,52 @@
 @ComponentPropertyType
 public @interface SlingServletFilter {
 
-    /** 
-     * Prefix for every property being generated from the annotations elements 
(as defined in OSGi 7 Compendium, 112.8.2.1) 
+    /**
+     * Prefix for every property being generated from the annotations elements 
(as defined in OSGi 7 Compendium, 112.8.2.1)
      */
     static final String PREFIX_ = "sling.filter.";
 
+    /**
+     * The scopes of the filter. If the filter has request scope, it is run 
once for a request. If the filter has component scope, it is run
+     * once for every included component (rendering).
+     * @return the scope of the filter
+     */
+    SlingServletFilterScope[] scope() default SlingServletFilterScope.REQUEST;
+
     /** 
      * Restrict the filter to paths that match the supplied regular 
expression. Requires Sling Engine 2.4.0.
      * @return the pattern to restrict the filter
      */
     String pattern() default "";
 
-    /** 
-     * The scopes of the filter. If the filter has request scope, it is run 
once for a request. If the filter has component scope, it is run
-     * once for every included component (rendering). 
-     * @return the scope of the filter
+    /**
+     * Restrict the filter to paths that match the supplied regular 
expression. Requires Sling Engine 2.4.0.
+     * @return the pattern to restrict the filter
      */
-    SlingServletFilterScope[] scope() default SlingServletFilterScope.REQUEST;
+    String suffix_pattern() default "";
+
+    /**
+     * Restrict the filter to resources that match any of the the supplied 
resource types. Requires Sling Engine 2.7.0.
 
 Review comment:
   Can you clarify whether absolute or relative resource types should be given 
here?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> add other "patterns" than path for filters
> ------------------------------------------
>
>                 Key: SLING-7759
>                 URL: https://issues.apache.org/jira/browse/SLING-7759
>             Project: Sling
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: Engine 2.6.12, Sling Servlet Annotations 1.0.0
>            Reporter: Nicolas Peltier
>            Assignee: Nicolas Peltier
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> adding additional patterns to filters (right now {{sling.filter.pattern}} 
> allows to include them based on path only):
> - path passes if sling.filter.pattern (i propose we keep it for legacy &  add 
> sling.filter.pattern.path for consistency with what follow) regexp matches 
> current path,
> - selector passes if sling.filter.pattern.selector is in the selector chain,
> - method passes if sling.filter.pattern.method is equals to curren method,
> - suffix  passes if sling.filter.pattern.suffix regep matches current suffix



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to