incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1088911 - in /sling/trunk/contrib/extensions/i18n: pom.xml src/main/java/org/apache/sling/i18n/impl/I18NFilter.java
Date Tue, 05 Apr 2011 07:23:37 GMT
Author: fmeschbe
Date: Tue Apr  5 07:23:37 2011
New Revision: 1088911

URL: http://svn.apache.org/viewvc?rev=1088911&view=rev
Log:
SLING-2046 Using @SlingFilter annotations makes it even easier

Modified:
    sling/trunk/contrib/extensions/i18n/pom.xml
    sling/trunk/contrib/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/I18NFilter.java

Modified: sling/trunk/contrib/extensions/i18n/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/i18n/pom.xml?rev=1088911&r1=1088910&r2=1088911&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/i18n/pom.xml (original)
+++ sling/trunk/contrib/extensions/i18n/pom.xml Tue Apr  5 07:23:37 2011
@@ -84,12 +84,6 @@
             <version>2.1.0</version>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.engine</artifactId>
-            <version>2.2.0</version>
-            <scope>provided</scope>
-        </dependency>
 
         <dependency>
             <groupId>org.apache.sling</groupId>

Modified: sling/trunk/contrib/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/I18NFilter.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/I18NFilter.java?rev=1088911&r1=1088910&r2=1088911&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/I18NFilter.java
(original)
+++ sling/trunk/contrib/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/I18NFilter.java
Tue Apr  5 07:23:37 2011
@@ -40,10 +40,10 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.ReferenceCardinality;
 import org.apache.felix.scr.annotations.ReferencePolicy;
-import org.apache.felix.scr.annotations.Service;
+import org.apache.felix.scr.annotations.sling.SlingFilter;
+import org.apache.felix.scr.annotations.sling.SlingFilterScope;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.wrappers.SlingHttpServletRequestWrapper;
-import org.apache.sling.engine.EngineConstants;
 import org.apache.sling.i18n.LocaleResolver;
 import org.apache.sling.i18n.ResourceBundleProvider;
 import org.osgi.framework.Constants;
@@ -54,13 +54,11 @@ import org.slf4j.LoggerFactory;
  * The <code>I18NFilter</code> class is a request level filter, which provides
  * the resource bundle for the current request.
  */
+@SlingFilter(generateComponent = false, generateService = true, order = -700, scope = SlingFilterScope.REQUEST)
 @Component(immediate = true, metatype = false)
 @Properties({
     @Property(name = Constants.SERVICE_DESCRIPTION, value = "Internationalization Support
Filter"),
-    @Property(name = Constants.SERVICE_VENDOR, value = "The Apache Software Foundation"),
-    @Property(name = EngineConstants.SLING_FILTER_SCOPE, value = EngineConstants.FILTER_SCOPE_REQUEST,
propertyPrivate = true),
-    @Property(name = Constants.SERVICE_RANKING, intValue = -700, propertyPrivate = true)
})
-@Service
+    @Property(name = Constants.SERVICE_VENDOR, value = "The Apache Software Foundation")
})
 public class I18NFilter implements Filter {
 
     /** default log */



Mime
View raw message