abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From calav...@apache.org
Subject svn commit: r676233 - /incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractProvider.java
Date Sat, 12 Jul 2008 20:23:35 GMT
Author: calavera
Date: Sat Jul 12 13:23:35 2008
New Revision: 676233

URL: http://svn.apache.org/viewvc?rev=676233&view=rev
Log:
ABDERA-186: Custom Provider request processors get overridden by defaults. Thanks to Christopher
Elkins.

Moved requestProcessors initialization to a protected constructor in order to drop trumped
requestProcessors.

Modified:
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractProvider.java

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractProvider.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractProvider.java?rev=676233&r1=676232&r2=676233&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractProvider.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractProvider.java
Sat Jul 12 13:23:35 2008
@@ -62,15 +62,18 @@
     protected List<Filter> filters = new ArrayList<Filter>();
     protected Map<TargetType, RequestProcessor> requestProcessors = new HashMap<TargetType,
RequestProcessor>();
 
+    protected AbstractProvider() {
+      // Setting default request processors:
+      this.requestProcessors.put(TargetType.TYPE_SERVICE, new ServiceRequestProcessor());
+      this.requestProcessors.put(TargetType.TYPE_CATEGORIES, new CategoriesRequestProcessor());
+      this.requestProcessors.put(TargetType.TYPE_COLLECTION, new CollectionRequestProcessor());
+      this.requestProcessors.put(TargetType.TYPE_ENTRY, new EntryRequestProcessor());
+      this.requestProcessors.put(TargetType.TYPE_MEDIA, new MediaRequestProcessor());
+    }
+
     public void init(Abdera abdera, Map<String, String> properties) {
         this.abdera = abdera;
         this.properties = properties;
-        // Setting default request processors:
-        this.requestProcessors.put(TargetType.TYPE_SERVICE, new ServiceRequestProcessor());
-        this.requestProcessors.put(TargetType.TYPE_CATEGORIES, new CategoriesRequestProcessor());
-        this.requestProcessors.put(TargetType.TYPE_COLLECTION, new CollectionRequestProcessor());
-        this.requestProcessors.put(TargetType.TYPE_ENTRY, new EntryRequestProcessor());
-        this.requestProcessors.put(TargetType.TYPE_MEDIA, new MediaRequestProcessor());
     }
 
     public String getProperty(String name) {



Mime
View raw message