You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by ch...@apache.org on 2009/09/23 14:16:10 UTC
svn commit: r818071 - in /incubator/shindig/trunk/php/src/social:
service/RestRequestItem.php servlet/DataServiceServlet.php
Author: chabotc
Date: Wed Sep 23 12:16:10 2009
New Revision: 818071
URL: http://svn.apache.org/viewvc?rev=818071&view=rev
Log:
Use the ApiServlet's route definitions and remove the old DataService defined ones
Modified:
incubator/shindig/trunk/php/src/social/service/RestRequestItem.php
incubator/shindig/trunk/php/src/social/servlet/DataServiceServlet.php
Modified: incubator/shindig/trunk/php/src/social/service/RestRequestItem.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/social/service/RestRequestItem.php?rev=818071&r1=818070&r2=818071&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/social/service/RestRequestItem.php (original)
+++ incubator/shindig/trunk/php/src/social/service/RestRequestItem.php Wed Sep 23 12:16:10 2009
@@ -76,32 +76,32 @@
$this->postData = $postData;
$service = $this->getServiceFromPath($this->url);
switch ($service) {
- case DataServiceServlet::$PEOPLE_ROUTE:
+ case ApiServlet::$PEOPLE_ROUTE:
// in our current implementation this will throw a SocialSPIException since we don't support
// adding people/friendships in our API yet, but this might be added some day
$data = $this->inputConverter->convertPeople($this->postData);
break;
- case DataServiceServlet::$ACTIVITY_ROUTE:
+ case ApiServlet::$ACTIVITY_ROUTE:
$data = $this->inputConverter->convertActivities($this->postData);
$this->params['activity'] = $data;
break;
- case DataServiceServlet::$APPDATA_ROUTE:
+ case ApiServlet::$APPDATA_ROUTE:
$data = $this->inputConverter->convertAppData($this->postData);
$this->params['data'] = $data;
break;
- case DataServiceServlet::$MESSAGE_ROUTE:
+ case ApiServlet::$MESSAGE_ROUTE:
$data = $this->inputConverter->convertMessages($this->postData);
// 'entity' may be a message or a message collection.
$this->params['entity'] = $data;
break;
- case DataServiceServlet::$INVALIDATE_ROUTE:
+ case ApiServlet::$INVALIDATE_ROUTE:
$this->params = json_decode($this->postData, true);
break;
- case DataServiceServlet::$ALBUM_ROUTE:
+ case ApiServlet::$ALBUM_ROUTE:
$data = $this->inputConverter->convertAlbums($this->postData);
$this->params['album'] = $data;
break;
- case DataServiceServlet::$MEDIA_ITEM_ROUTE:
+ case ApiServlet::$MEDIA_ITEM_ROUTE:
$data = $this->inputConverter->convertMediaItems($this->postData);
if (isset($data)) {
$this->params['mediaItem'] = $data;
Modified: incubator/shindig/trunk/php/src/social/servlet/DataServiceServlet.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/social/servlet/DataServiceServlet.php?rev=818071&r1=818070&r2=818071&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/social/servlet/DataServiceServlet.php (original)
+++ incubator/shindig/trunk/php/src/social/servlet/DataServiceServlet.php Wed Sep 23 12:16:10 2009
@@ -25,16 +25,6 @@
protected static $ATOM_FORMAT = "atom";
protected static $XML_FORMAT = "xml";
- public static $PEOPLE_ROUTE = "people";
- public static $ACTIVITY_ROUTE = "activities";
- public static $APPDATA_ROUTE = "appdata";
- public static $MESSAGE_ROUTE = "messages";
- public static $INVALIDATE_ROUTE = "cache";
- public static $SYSTEM_ROUTE = "system";
- public static $ALBUM_ROUTE = "albums";
- public static $MEDIA_ITEM_ROUTE = "mediaitems";
-
-
public function doGet() {
$this->doPost();
}