abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r1175894 - in /abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server: impl/ processors/ provider/basic/
Date Mon, 26 Sep 2011 14:54:52 GMT
Author: jmsnell
Date: Mon Sep 26 14:54:51 2011
New Revision: 1175894

URL: http://svn.apache.org/viewvc?rev=1175894&view=rev
Log: (empty)

Modified:
    abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractAtompubCollectionAdapter.java
    abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractAtompubProvider.java
    abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractAtompubWorkspaceProvider.java
    abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractEntityCollectionAdapter.java
    abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/processors/CategoriesRequestProcessor.java
    abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/processors/ServiceRequestProcessor.java
    abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/provider/basic/BasicAdapter.java

Modified: abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractAtompubCollectionAdapter.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractAtompubCollectionAdapter.java?rev=1175894&r1=1175893&r2=1175894&view=diff
==============================================================================
--- abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractAtompubCollectionAdapter.java
(original)
+++ abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractAtompubCollectionAdapter.java
Mon Sep 26 14:54:51 2011
@@ -78,7 +78,7 @@ public abstract class AbstractAtompubCol
      * Location, Content-Location, Etag and status are set appropriately.
      */
     protected <S extends ResponseContext>S buildPostMediaEntryResponse(String link,
Entry entry) {
-        return buildCreateEntryResponse(link, entry);
+        return (S)buildCreateEntryResponse(link, entry);
     }
 
     /**

Modified: abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractAtompubProvider.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractAtompubProvider.java?rev=1175894&r1=1175893&r2=1175894&view=diff
==============================================================================
--- abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractAtompubProvider.java
(original)
+++ abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractAtompubProvider.java
Mon Sep 26 14:54:51 2011
@@ -286,6 +286,6 @@ public abstract class AbstractAtompubPro
 
     @Override
     public <S extends ResponseContext> S process(RequestContext request) {
-      return super.process(request instanceof AtompubRequestContext?request:new AtompubRequestContext(request));
+      return (S)super.process(request instanceof AtompubRequestContext?request:new AtompubRequestContext(request));
     }
 }

Modified: abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractAtompubWorkspaceProvider.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractAtompubWorkspaceProvider.java?rev=1175894&r1=1175893&r2=1175894&view=diff
==============================================================================
--- abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractAtompubWorkspaceProvider.java
(original)
+++ abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractAtompubWorkspaceProvider.java
Mon Sep 26 14:54:51 2011
@@ -34,6 +34,7 @@ import org.apache.abdera2.protocol.serve
 import org.apache.abdera2.protocol.server.processors.CategoriesRequestProcessor;
 import org.apache.abdera2.protocol.server.processors.ServiceRequestProcessor;
 
+@SuppressWarnings("unchecked")
 public abstract class AbstractAtompubWorkspaceProvider 
   extends AbstractWorkspaceProvider
   implements AtompubProvider, 
@@ -62,13 +63,12 @@ public abstract class AbstractAtompubWor
     return abdera;
   }
 
-  @SuppressWarnings("unchecked")
   public <S extends ResponseContext>S createErrorResponse(int code, String message,
Throwable t) {
     return (S)AbstractAtompubProvider.createErrorResponse(abdera,code,message,t);
   }
   
   @Override
   public <S extends ResponseContext> S process(RequestContext request) {
-    return super.process(request instanceof AtompubRequestContext?request:new AtompubRequestContext(request));
+    return (S)super.process(request instanceof AtompubRequestContext?request:new AtompubRequestContext(request));
   }
 }
\ No newline at end of file

Modified: abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractEntityCollectionAdapter.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractEntityCollectionAdapter.java?rev=1175894&r1=1175893&r2=1175894&view=diff
==============================================================================
--- abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractEntityCollectionAdapter.java
(original)
+++ abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractEntityCollectionAdapter.java
Mon Sep 26 14:54:51 2011
@@ -80,7 +80,7 @@ public abstract class AbstractEntityColl
 
     @Override
     public <S extends ResponseContext>S postMedia(RequestContext request) {
-        return createMediaEntry(request);
+        return (S)createMediaEntry(request);
     }
 
     @Override
@@ -95,7 +95,7 @@ public abstract class AbstractEntityColl
         } catch (IOException e) {
             return (S)new EmptyResponseContext(500);
         } catch (ResponseContextException e) {
-            return createErrorResponse(e);
+            return (S)createErrorResponse(e);
         }
     }
 
@@ -115,7 +115,7 @@ public abstract class AbstractEntityColl
     }
 
     public <S extends ResponseContext>S postItem(RequestContext request) {
-        return createNonMediaEntry(request);
+        return (S)createNonMediaEntry(request);
     }
 
     protected String getLink(T entryObj, IRI feedIri, RequestContext request) throws ResponseContextException
{
@@ -176,7 +176,7 @@ public abstract class AbstractEntityColl
             try {
                 deleteEntry(id, request);
             } catch (ResponseContextException e) {
-                return createErrorResponse(e);
+                return (S)createErrorResponse(e);
             }
 
             return (S)new EmptyResponseContext(204);
@@ -200,7 +200,7 @@ public abstract class AbstractEntityColl
             try {
                 deleteMedia(resourceName, request);
             } catch (ResponseContextException e) {
-                return createErrorResponse(e);
+                return (S)createErrorResponse(e);
             }
 
             return (S)new EmptyResponseContext(204);
@@ -248,12 +248,12 @@ public abstract class AbstractEntityColl
         try {
             Entry entry = getEntryFromCollectionProvider(request);
             if (entry != null) {
-                return buildGetEntryResponse(request, entry);
+                return (S)buildGetEntryResponse(request, entry);
             } else {
                 return (S)new EmptyResponseContext(404);
             }
         } catch (ResponseContextException e) {
-            return createErrorResponse(e);
+            return (S)createErrorResponse(e);
         }
     }
 
@@ -271,7 +271,7 @@ public abstract class AbstractEntityColl
             T entryObj = getEntry(resourceName, request);
 
             if (entryObj != null) {
-                return buildHeadEntryResponse(request, resourceName, getUpdated(entryObj));
+                return (S)buildHeadEntryResponse(request, resourceName, getUpdated(entryObj));
             } else {
                 return (S)new EmptyResponseContext(404);
             }
@@ -286,12 +286,12 @@ public abstract class AbstractEntityColl
             T entryObj = getEntry(resourceName, request);
 
             if (entryObj != null) {
-                return buildHeadEntryResponse(request, resourceName, getUpdated(entryObj));
+                return (S)buildHeadEntryResponse(request, resourceName, getUpdated(entryObj));
             } else {
                 return (S)new EmptyResponseContext(404);
             }
         } catch (ResponseContextException e) {
-            return createErrorResponse(e);
+            return (S)createErrorResponse(e);
         }
     }
 
@@ -301,9 +301,9 @@ public abstract class AbstractEntityColl
 
             addFeedDetails(feed, request);
 
-            return buildGetFeedResponse(feed);
+            return (S)buildGetFeedResponse(feed);
         } catch (ResponseContextException e) {
-            return createErrorResponse(e);
+            return (S)createErrorResponse(e);
         }
     }
 
@@ -353,13 +353,13 @@ public abstract class AbstractEntityColl
                 return (S)new EmptyResponseContext(404);
             }
 
-            return buildGetMediaResponse(resource, entryObj);
+            return (S)buildGetMediaResponse(resource, entryObj);
         } catch (ParseException pe) {
             return (S)new EmptyResponseContext(415);
         } catch (ClassCastException cce) {
             return (S)new EmptyResponseContext(415);
         } catch (ResponseContextException e) {
-            return e.getResponseContext();
+            return (S)e.getResponseContext();
         } catch (Exception e) {
             log.warn(e.getMessage(), e);
             return (S)new EmptyResponseContext(400);
@@ -450,7 +450,7 @@ public abstract class AbstractEntityColl
                 return (S)new EmptyResponseContext(404);
             }
         } catch (ResponseContextException e) {
-            return createErrorResponse(e);
+            return (S)createErrorResponse(e);
         } catch (ParseException pe) {
             return (S)new EmptyResponseContext(415);
         } catch (ClassCastException cce) {
@@ -575,11 +575,11 @@ public abstract class AbstractEntityColl
             addMediaContent(feedUri, entry, entryObj, request);
 
             String location = getLink(entryObj, feedUri, request, true);
-            return buildPostMediaEntryResponse(location, entry);
+            return (S)buildPostMediaEntryResponse(location, entry);
         } catch (IOException e) {
             return (S)new EmptyResponseContext(500);
         } catch (ResponseContextException e) {
-            return createErrorResponse(e);
+            return (S)createErrorResponse(e);
         }
     }
 
@@ -609,12 +609,12 @@ public abstract class AbstractEntityColl
                 entry.addLink(link, "edit");
 
                 String location = getLink(entryObj, feedUri, request, true);
-                return buildCreateEntryResponse(location, entry);
+                return (S)buildCreateEntryResponse(location, entry);
             } else {
                 return (S)new EmptyResponseContext(400);
             }
         } catch (ResponseContextException e) {
-            return createErrorResponse(e);
+            return (S)createErrorResponse(e);
         }
     }
 

Modified: abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/processors/CategoriesRequestProcessor.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/processors/CategoriesRequestProcessor.java?rev=1175894&r1=1175893&r2=1175894&view=diff
==============================================================================
--- abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/processors/CategoriesRequestProcessor.java
(original)
+++ abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/processors/CategoriesRequestProcessor.java
Mon Sep 26 14:54:51 2011
@@ -38,7 +38,7 @@ public class CategoriesRequestProcessor 
         if (collectionAdapter == null || !(collectionAdapter instanceof AtompubCollectionAdapter))
{
             return (S)ProviderHelper.notfound(context);
         } else {
-            return this.processCategories(context, collectionAdapter);
+            return (S)this.processCategories(context, collectionAdapter);
         }
     }
 

Modified: abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/processors/ServiceRequestProcessor.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/processors/ServiceRequestProcessor.java?rev=1175894&r1=1175893&r2=1175894&view=diff
==============================================================================
--- abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/processors/ServiceRequestProcessor.java
(original)
+++ abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/processors/ServiceRequestProcessor.java
Mon Sep 26 14:54:51 2011
@@ -41,13 +41,14 @@ import org.apache.abdera2.writer.StreamW
  * {@link org.apache.AtompubRequestProcessor.protocol.server.RequestProcessor} implementation
which processes requests for service
  * documents.
  */
+@SuppressWarnings("unchecked")
 public class ServiceRequestProcessor 
   implements RequestProcessor {
 
     public <S extends ResponseContext> S process(
         RequestContext request, WorkspaceManager workspaceManager,
         CollectionAdapter collectionAdapter) {
-      return this.processService(request, workspaceManager);
+      return (S)this.processService(request, workspaceManager);
     }
   
     private <S extends ResponseContext>S processService(
@@ -55,7 +56,7 @@ public class ServiceRequestProcessor 
         WorkspaceManager workspaceManager) {
         String method = context.getMethod();
         if (method.equalsIgnoreCase("GET")) {
-            return this.getServiceDocument(context, workspaceManager);
+            return (S)this.getServiceDocument(context, workspaceManager);
         } else {
             return null;
         }

Modified: abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/provider/basic/BasicAdapter.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/provider/basic/BasicAdapter.java?rev=1175894&r1=1175893&r2=1175894&view=diff
==============================================================================
--- abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/provider/basic/BasicAdapter.java
(original)
+++ abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/provider/basic/BasicAdapter.java
Mon Sep 26 14:54:51 2011
@@ -117,7 +117,7 @@ public abstract class BasicAdapter exten
     }
 
     public <S extends ResponseContext>S postItem(RequestContext request) {
-        return createOrUpdateEntry(request, true);
+        return (S)createOrUpdateEntry(request, true);
     }
 
     public <S extends ResponseContext>S deleteItem(RequestContext request) {
@@ -131,7 +131,7 @@ public abstract class BasicAdapter exten
     }
 
     public <S extends ResponseContext>S putItem(RequestContext request) {
-        return createOrUpdateEntry(request, false);
+        return (S)createOrUpdateEntry(request, false);
     }
 
     public <S extends ResponseContext>S getItem(RequestContext request) {



Mime
View raw message