Author: cziegeler
Date: Tue Mar 8 13:49:59 2011
New Revision: 1079353
URL: http://svn.apache.org/viewvc?rev=1079353&view=rev
Log:
FELIX-2874 : Add new scopes to SlingFilter annotation and use new property names
Modified:
felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scr/annotations/sling/SlingFilterScope.java
felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingAnnotationTagProvider.java
Modified:
felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scr/annotations/sling/SlingFilterScope.java
URL:
http://svn.apache.org/viewvc/felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scr/annotations/sling/SlingFilterScope.java?rev=1079353&r1=1079352&r2=1079353&view=diff
==============================================================================
---
felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scr/annotations/sling/SlingFilterScope.java
(original)
+++
felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scr/annotations/sling/SlingFilterScope.java
Tue Mar 8 13:49:59 2011
@@ -23,9 +23,15 @@ package org.apache.felix.scr.annotations
*/
public enum SlingFilterScope {
- REQUEST("request"),
+ REQUEST("REQUEST"),
- COMPONENT("component");
+ COMPONENT("COMPONENT"),
+
+ ERROR("ERROR"),
+
+ INCLUDE("INCLUDE"),
+
+ FORWARD("FORWARD");
private final String scope;
Modified:
felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingAnnotationTagProvider.java
URL:
http://svn.apache.org/viewvc/felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingAnnotationTagProvider.java?rev=1079353&r1=1079352&r2=1079353&view=diff
==============================================================================
---
felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingAnnotationTagProvider.java
(original)
+++
felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingAnnotationTagProvider.java
Tue Mar 8 13:49:59 2011
@@ -21,14 +21,10 @@ package org.apache.felix.scrplugin.tags.
import java.util.ArrayList;
import java.util.List;
-import org.apache.felix.scr.annotations.sling.SlingFilter;
-import org.apache.felix.scr.annotations.sling.SlingFilterScope;
-import org.apache.felix.scr.annotations.sling.SlingServlet;
+import org.apache.felix.scr.annotations.sling.*;
import org.apache.felix.scrplugin.tags.JavaField;
import org.apache.felix.scrplugin.tags.JavaTag;
-import
org.apache.felix.scrplugin.tags.annotation.AnnotationJavaClassDescription;
-import org.apache.felix.scrplugin.tags.annotation.AnnotationTagProvider;
-import org.apache.felix.scrplugin.tags.annotation.Util;
+import org.apache.felix.scrplugin.tags.annotation.*;
/**
* Annotation tag provider for sling-specific SCR annotations.
@@ -130,13 +126,13 @@ public class SlingAnnotationTagProvider
tags.add(new SlingFilterServiceTag(annotation, description));
}
- // property order
+ // property order = service.ranking
final int order = Util.getIntValue(annotation, "order",
SlingFilter.class);
- tags.add(new SlingServletPropertyTag(annotation,
"filter.order",String.valueOf(order), description, "Integer", true));
+ tags.add(new SlingServletPropertyTag(annotation,
"service.ranking", String.valueOf(order), description, "Integer", true));
// property scope
final SlingFilterScope scope = Util.getEnumValue(annotation,
"scope", SlingFilterScope.class, SlingFilter.class);
- tags.add(new SlingServletPropertyTag(annotation,
"filter.scope",scope.getScope(), description, null, true));
+ tags.add(new SlingServletPropertyTag(annotation,
"sling.filter.scope", scope.getScope(), description, null, true));
}
return tags;