You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by rb...@apache.org on 2013/11/20 01:24:54 UTC

svn commit: r1543664 - in /shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi: AlbumService.java MediaItemService.java MessageService.java

Author: rbaxter85
Date: Wed Nov 20 00:24:54 2013
New Revision: 1543664

URL: http://svn.apache.org/r1543664
Log:
SHINDIG-1953: Return 501 Not Implemented for the default "not implemented" services
Committed For Andreas Kohn

Modified:
    shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/AlbumService.java
    shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/MediaItemService.java
    shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/MessageService.java

Modified: shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/AlbumService.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/AlbumService.java?rev=1543664&r1=1543663&r2=1543664&view=diff
==============================================================================
--- shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/AlbumService.java (original)
+++ shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/AlbumService.java Wed Nov 20 00:24:54 2013
@@ -128,27 +128,27 @@ public interface AlbumService {
 
   public static class NotImplementedAlbumService implements AlbumService {
     public Future<Album> getAlbum(UserId userId, String appId, Set<String> fields, String albumId, SecurityToken token) throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
 
     public Future<RestfulCollection<Album>> getAlbums(UserId userId, String appId, Set<String> fields, CollectionOptions options, Set<String> albumIds, SecurityToken token) throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
 
     public Future<RestfulCollection<Album>> getAlbums(Set<UserId> userIds, GroupId groupId, String appId, Set<String> fields, CollectionOptions options, SecurityToken token) throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
 
     public Future<Void> deleteAlbum(UserId userId, String appId, String albumId, SecurityToken token) throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
 
     public Future<Void> createAlbum(UserId userId, String appId, Album album, SecurityToken token) throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
 
     public Future<Void> updateAlbum(UserId userId, String appId, Album album, String albumId, SecurityToken token) throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
   }
 }

Modified: shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/MediaItemService.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/MediaItemService.java?rev=1543664&r1=1543663&r2=1543664&view=diff
==============================================================================
--- shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/MediaItemService.java (original)
+++ shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/MediaItemService.java Wed Nov 20 00:24:54 2013
@@ -151,31 +151,31 @@ public interface MediaItemService {
 
   public class NotImplementedMediaItemService implements MediaItemService {
     public Future<MediaItem> getMediaItem(UserId userId, String appId, String albumId, String mediaItemId, Set<String> fields, SecurityToken token) throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
 
     public Future<RestfulCollection<MediaItem>> getMediaItems(UserId userId, String appId, String albumId, Set<String> mediaItemIds, Set<String> fields, CollectionOptions options, SecurityToken token) throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
 
     public Future<RestfulCollection<MediaItem>> getMediaItems(UserId userId, String appId, String albumId, Set<String> fields, CollectionOptions options, SecurityToken token) throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
 
     public Future<RestfulCollection<MediaItem>> getMediaItems(Set<UserId> userIds, GroupId groupId, String appId, Set<String> fields, CollectionOptions options, SecurityToken token) throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
 
     public Future<Void> deleteMediaItem(UserId userId, String appId, String albumId, String mediaItemId, SecurityToken token) throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
 
     public Future<Void> createMediaItem(UserId userId, String appId, String albumId, MediaItem mediaItem, SecurityToken token) throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
 
     public Future<Void> updateMediaItem(UserId userId, String appId, String albumId, String mediaItemId, MediaItem mediaItem, SecurityToken token) throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
   }
 }

Modified: shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/MessageService.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/MessageService.java?rev=1543664&r1=1543663&r2=1543664&view=diff
==============================================================================
--- shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/MessageService.java (original)
+++ shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/MessageService.java Wed Nov 20 00:24:54 2013
@@ -151,39 +151,39 @@ public interface MessageService {
   public static class NotImplementedMessageService implements MessageService {
     public Future<RestfulCollection<MessageCollection>> getMessageCollections(UserId userId,
        Set<String> fields, CollectionOptions options, SecurityToken token) throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
 
     public Future<MessageCollection> createMessageCollection(UserId userId, MessageCollection msgCollection, SecurityToken token)  throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
 
     public Future<Void> modifyMessageCollection(UserId userId, MessageCollection msgCollection, SecurityToken token) throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
 
     public Future<Void> deleteMessageCollection(UserId userId, String msgCollId, SecurityToken token) throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
 
     public Future<RestfulCollection<Message>> getMessages(UserId userId, String msgCollId,
         Set<String> fields, List<String> msgIds, CollectionOptions options, SecurityToken token) throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
 
     public Future<Void> createMessage(UserId userId, String appId, String msgCollId, Message message,
                                SecurityToken token) throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
 
     public Future<Void> deleteMessages(UserId userId, String msgCollId, List<String> ids,
         SecurityToken token) throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
 
     public Future<Void> modifyMessage(UserId userId, String msgCollId, String messageId, Message message, SecurityToken token)
         throws ProtocolException {
-      throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Not Implemented");
+      throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
     }
   }
 }