You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by do...@apache.org on 2008/06/19 20:19:47 UTC

svn commit: r669613 [1/2] - in /incubator/shindig/trunk/java/social-api/src: main/java/org/apache/shindig/social/dataservice/ main/java/org/apache/shindig/social/opensocial/ main/java/org/apache/shindig/social/opensocial/model/ main/java/org/apache/shi...

Author: doll
Date: Thu Jun 19 11:19:46 2008
New Revision: 669613

URL: http://svn.apache.org/viewvc?rev=669613&view=rev
Log:
SHINDIG-203
All of the opensocial model objects have been extracted into interfaces. This gives implementors of the social data apis mroe flexibility. 

This code is not fully cleaned up yet because the BeanJsonConverter needs concrete classes in order to translate from json to pojos. Because of this some of the dataservice classes reference ActivityImpl directly and the Activity interface itself has a set MediaItemImpl method on it. There are todos in the code to fix this as soon as we can. 



Added:
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Activity.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/ActivityImpl.java
      - copied, changed from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Activity.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Address.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/AddressImpl.java
      - copied, changed from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Address.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/ApiCollection.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/ApiCollectionImpl.java
      - copied, changed from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/ApiCollection.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/BodyType.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/BodyTypeImpl.java
      - copied, changed from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/BodyType.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Email.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/EmailImpl.java
      - copied, changed from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Email.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Enum.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/EnumImpl.java
      - copied, changed from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Enum.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/MediaItem.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/MediaItemImpl.java
      - copied, changed from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/MediaItem.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Message.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/MessageImpl.java
      - copied, changed from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Message.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Name.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/NameImpl.java
      - copied, changed from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Name.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Organization.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/OrganizationImpl.java
      - copied, changed from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Organization.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Person.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/PersonImpl.java
      - copied, changed from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Person.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Phone.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/PhoneImpl.java
      - copied, changed from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Phone.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Url.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/UrlImpl.java
      - copied, changed from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Url.java
Modified:
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/dataservice/ActivityHandler.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/OpenSocialDataHandler.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/samplecontainer/BasicPeopleService.java
    incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/samplecontainer/XmlStateFileFetcher.java
    incubator/shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/SocialApiTestsGuiceModule.java
    incubator/shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/abdera/RestfulAtomActivityTest.java
    incubator/shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/ActivityHandlerTest.java
    incubator/shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/util/BeanJsonConverterTest.java
    incubator/shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/util/BeanXmlConverterTest.java

Modified: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/dataservice/ActivityHandler.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/dataservice/ActivityHandler.java?rev=669613&r1=669612&r2=669613&view=diff
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/dataservice/ActivityHandler.java (original)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/dataservice/ActivityHandler.java Thu Jun 19 11:19:46 2008
@@ -21,6 +21,7 @@
 
 import org.apache.shindig.social.ResponseError;
 import org.apache.shindig.social.ResponseItem;
+import org.apache.shindig.social.opensocial.model.ActivityImpl;
 import org.apache.shindig.social.opensocial.model.Activity;
 
 public class ActivityHandler extends DataRequestHandler {
@@ -62,7 +63,8 @@
     // TODO: Should we pass the groupId through to the service?
 
     String jsonActivity = request.getParameters().get("entry");
-    Activity activity = converter.convertToObject(jsonActivity, Activity.class);
+    // TODO: Change this so that somehow we don't need to know the impl class.
+    Activity activity = converter.convertToObject(jsonActivity, ActivityImpl.class);
 
     return service.createActivity(userId, activity, request.getToken());
   }

Modified: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/OpenSocialDataHandler.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/OpenSocialDataHandler.java?rev=669613&r1=669612&r2=669613&view=diff
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/OpenSocialDataHandler.java (original)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/OpenSocialDataHandler.java Thu Jun 19 11:19:46 2008
@@ -21,8 +21,9 @@
 import org.apache.shindig.social.RequestItem;
 import org.apache.shindig.social.ResponseError;
 import org.apache.shindig.social.ResponseItem;
-import org.apache.shindig.social.opensocial.model.Activity;
 import org.apache.shindig.social.opensocial.model.IdSpec;
+import org.apache.shindig.social.opensocial.model.ActivityImpl;
+import org.apache.shindig.social.opensocial.model.Activity;
 import org.apache.shindig.social.opensocial.util.BeanJsonConverter;
 
 import com.google.common.collect.Lists;
@@ -145,7 +146,7 @@
           String personId = peopleIds.get(0);
 
           Activity activity = beanJsonConverter.convertToObject(
-              params.getString("activity"), Activity.class);
+              params.getString("activity"), ActivityImpl.class);
           response = activitiesHandler.createActivity(personId, activity,
               request.getToken());
           break;

Added: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Activity.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Activity.java?rev=669613&view=auto
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Activity.java (added)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Activity.java Thu Jun 19 11:19:46 2008
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.shindig.social.opensocial.model;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+public interface Activity {
+
+  public static enum Field {
+    APP_ID("appId"),
+    BODY("body"),
+    BODY_ID("bodyId"),
+    EXTERNAL_ID("externalId"),
+    ID("id"),
+    LAST_UPDATED("updated"),
+    MEDIA_ITEMS("mediaItems"),
+    POSTED_TIME("postedTime"),
+    PRIORITY("priority"),
+    STREAM_FAVICON_URL("streamFaviconUrl"),
+    STREAM_SOURCE_URL("streamSourceUrl"),
+    STREAM_TITLE("streamTitle"),
+    STREAM_URL("streamUrl"),
+    TEMPLATE_PARAMS("templateParams"),
+    TITLE("title"),
+    TITLE_ID("titleId"),
+    URL("url"),
+    USER_ID("userId");
+
+    private final String jsonString;
+
+    private Field(String jsonString) {
+      this.jsonString = jsonString;
+    }
+
+    @Override
+    public String toString() {
+      return jsonString;
+    }
+  }
+
+  String getAppId();
+
+  void setAppId(String appId);
+
+  String getBody();
+
+  void setBody(String body);
+
+  String getBodyId();
+
+  void setBodyId(String bodyId);
+
+  String getExternalId();
+
+  void setExternalId(String externalId);
+
+  String getId();
+
+  void setId(String id);
+
+  Date getUpdated();
+
+  void setUpdated(Date updated);
+
+  List<? extends MediaItem> getMediaItems();
+
+  // TODO: Change this to use the interface. This is only in place for the BeanJsonConverter
+  void setMediaItems(List<MediaItemImpl> mediaItems);
+
+  Long getPostedTime();
+
+  void setPostedTime(Long postedTime);
+
+  Float getPriority();
+
+  void setPriority(Float priority);
+
+  String getStreamFaviconUrl();
+
+  void setStreamFaviconUrl(String streamFaviconUrl);
+
+  String getStreamSourceUrl();
+
+  void setStreamSourceUrl(String streamSourceUrl);
+
+  String getStreamTitle();
+
+  void setStreamTitle(String streamTitle);
+
+  String getStreamUrl();
+
+  void setStreamUrl(String streamUrl);
+
+  Map<String, String> getTemplateParams();
+
+  void setTemplateParams(Map<String, String> templateParams);
+
+  String getTitle();
+
+  void setTitle(String title);
+
+  String getTitleId();
+
+  void setTitleId(String titleId);
+
+  String getUrl();
+
+  void setUrl(String url);
+
+  String getUserId();
+
+  void setUserId(String userId);
+}

Copied: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/ActivityImpl.java (from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Activity.java)
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/ActivityImpl.java?p2=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/ActivityImpl.java&p1=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Activity.java&r1=669311&r2=669613&rev=669613&view=diff
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Activity.java (original)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/ActivityImpl.java Thu Jun 19 11:19:46 2008
@@ -21,39 +21,7 @@
 import java.util.List;
 import java.util.Map;
 
-public class Activity {
-
-  public static enum Field {
-    APP_ID("appId"),
-    BODY("body"),
-    BODY_ID("bodyId"),
-    EXTERNAL_ID("externalId"),
-    ID("id"),
-    LAST_UPDATED("updated"),
-    MEDIA_ITEMS("mediaItems"),
-    POSTED_TIME("postedTime"),
-    PRIORITY("priority"),
-    STREAM_FAVICON_URL("streamFaviconUrl"),
-    STREAM_SOURCE_URL("streamSourceUrl"),
-    STREAM_TITLE("streamTitle"),
-    STREAM_URL("streamUrl"),
-    TEMPLATE_PARAMS("templateParams"),
-    TITLE("title"),
-    TITLE_ID("titleId"),
-    URL("url"),
-    USER_ID("userId");
-
-    private final String jsonString;
-
-    private Field(String jsonString) {
-      this.jsonString = jsonString;
-    }
-
-    @Override
-    public String toString() {
-      return jsonString;
-    }
-  }
+public class ActivityImpl implements Activity {
 
   private String appId;
   private String body;
@@ -61,7 +29,7 @@
   private String externalId;
   private String id;
   private Date updated;
-  private List<MediaItem> mediaItems;
+  private List<MediaItemImpl> mediaItems;
   private Long postedTime;
   private Float priority;
   private String streamFaviconUrl;
@@ -74,10 +42,10 @@
   private String url;
   private String userId;
 
-  public Activity() {
+  public ActivityImpl() {
   }
 
-  public Activity(String id, String userId) {
+  public ActivityImpl(String id, String userId) {
     this.id = id;
     this.userId = userId;
   }
@@ -130,11 +98,11 @@
     this.updated = updated;
   }
 
-  public List<MediaItem> getMediaItems() {
+  public List<? extends MediaItem> getMediaItems() {
     return mediaItems;
   }
 
-  public void setMediaItems(List<MediaItem> mediaItems) {
+  public void setMediaItems(List<MediaItemImpl> mediaItems) {
     this.mediaItems = mediaItems;
   }
 

Added: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Address.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Address.java?rev=669613&view=auto
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Address.java (added)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Address.java Thu Jun 19 11:19:46 2008
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.shindig.social.opensocial.model;
+
+/**
+ * see
+ * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Address.Field.html
+ *
+ */
+public interface Address {
+
+  public static enum Field {
+    COUNTRY("country"),
+    EXTENDED_ADDRESS("extendedAddress"),
+    LATITUDE("latitude"),
+    LOCALITY("locality"),
+    LONGITUDE("longitude"),
+    PO_BOX("poBox"),
+    POSTAL_CODE("postalCode"),
+    REGION("region"),
+    STREET_ADDRESS("streetAddress"),
+    TYPE("type"),
+    UNSTRUCTURED_ADDRESS("unstructuredAddress");
+
+    private final String jsonString;
+
+    private Field(String jsonString) {
+      this.jsonString = jsonString;
+    }
+
+    @Override
+    public String toString() {
+      return this.jsonString;
+    }
+  }
+  
+  String getCountry();
+
+  void setCountry(String country);
+
+  String getExtendedAddress();
+
+  void setExtendedAddress(String extendedAddress);
+
+  Float getLatitude();
+
+  void setLatitude(Float latitude);
+
+  String getLocality();
+
+  void setLocality(String locality);
+
+  Float getLongitude();
+
+  void setLongitude(Float longitude);
+
+  String getPoBox();
+
+  void setPoBox(String poBox);
+
+  String getPostalCode();
+
+  void setPostalCode(String postalCode);
+
+  String getRegion();
+
+  void setRegion(String region);
+
+  String getStreetAddress();
+
+  void setStreetAddress(String streetAddress);
+
+  String getType();
+
+  void setType(String type);
+
+  String getUnstructuredAddress();
+
+  void setUnstructuredAddress(String unstructuredAddress);
+}

Copied: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/AddressImpl.java (from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Address.java)
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/AddressImpl.java?p2=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/AddressImpl.java&p1=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Address.java&r1=669311&r2=669613&rev=669613&view=diff
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Address.java (original)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/AddressImpl.java Thu Jun 19 11:19:46 2008
@@ -17,37 +17,7 @@
  */
 package org.apache.shindig.social.opensocial.model;
 
-/**
- * see
- * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Address.Field.html
- *
- */
-public class Address {
-
-  public static enum Field {
-    COUNTRY("country"),
-    EXTENDED_ADDRESS("extendedAddress"),
-    LATITUDE("latitude"),
-    LOCALITY("locality"),
-    LONGITUDE("longitude"),
-    PO_BOX("poBox"),
-    POSTAL_CODE("postalCode"),
-    REGION("region"),
-    STREET_ADDRESS("streetAddress"),
-    TYPE("type"),
-    UNSTRUCTURED_ADDRESS("unstructuredAddress");
-
-    private final String jsonString;
-
-    private Field(String jsonString) {
-      this.jsonString = jsonString;
-    }
-
-    @Override
-    public String toString() {
-      return this.jsonString;
-    }
-  }
+public class AddressImpl implements Address {
 
   private String country;
   private String extendedAddress;
@@ -61,7 +31,7 @@
   private String type;
   private String unstructuredAddress;
 
-  public Address(String unstructuredAddress) {
+  public AddressImpl(String unstructuredAddress) {
     this.unstructuredAddress = unstructuredAddress;
   }
 

Added: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/ApiCollection.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/ApiCollection.java?rev=669613&view=auto
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/ApiCollection.java (added)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/ApiCollection.java Thu Jun 19 11:19:46 2008
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.shindig.social.opensocial.model;
+
+import java.util.List;
+
+/**
+ * see
+ * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Collection.html
+ */
+public interface ApiCollection<T> {
+  List<T> getItems();
+
+  void setItems(List<T> items);
+
+  int getOffset();
+
+  void setOffset(int offset);
+
+  int getTotalSize();
+
+  void setTotalSize(int totalSize);
+}

Copied: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/ApiCollectionImpl.java (from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/ApiCollection.java)
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/ApiCollectionImpl.java?p2=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/ApiCollectionImpl.java&p1=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/ApiCollection.java&r1=669311&r2=669613&rev=669613&view=diff
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/ApiCollection.java (original)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/ApiCollectionImpl.java Thu Jun 19 11:19:46 2008
@@ -19,20 +19,16 @@
 
 import java.util.List;
 
-/**
- * see
- * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Collection.html
- */
-public class ApiCollection<T> {
+public class ApiCollectionImpl<T> implements ApiCollection<T> {
   private List<T> items;
   private int offset;
   private int totalSize;
 
-  public ApiCollection(List<T> items) {
+  public ApiCollectionImpl(List<T> items) {
     this(items, 0, items.size());
   }
 
-  public ApiCollection(List<T> items, int offset, int totalSize) {
+  public ApiCollectionImpl(List<T> items, int offset, int totalSize) {
     this.items = items;
     this.offset = offset;
     this.totalSize = totalSize;

Added: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/BodyType.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/BodyType.java?rev=669613&view=auto
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/BodyType.java (added)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/BodyType.java Thu Jun 19 11:19:46 2008
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.shindig.social.opensocial.model;
+
+public interface BodyType {
+
+  public static enum Field {
+    BUILD("build"),
+    EYE_COLOR("eyeColor"),
+    HAIR_COLOR("hairColor"),
+    HEIGHT("height"),
+    WEIGHT("weight");
+
+    private final String jsonString;
+
+    private Field(String jsonString) {
+      this.jsonString = jsonString;
+    }
+
+    @Override
+    public String toString() {
+      return this.jsonString;
+    }
+  }
+  
+  String getBuild();
+
+  void setBuild(String build);
+
+  String getEyeColor();
+
+  void setEyeColor(String eyeColor);
+
+  String getHairColor();
+
+  void setHairColor(String hairColor);
+
+  String getHeight();
+
+  void setHeight(String height);
+
+  String getWeight();
+
+  void setWeight(String weight);
+}

Copied: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/BodyTypeImpl.java (from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/BodyType.java)
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/BodyTypeImpl.java?p2=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/BodyTypeImpl.java&p1=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/BodyType.java&r1=669311&r2=669613&rev=669613&view=diff
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/BodyType.java (original)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/BodyTypeImpl.java Thu Jun 19 11:19:46 2008
@@ -22,26 +22,7 @@
  * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.BodyType.Field.html
  *
  */
-public class BodyType {
-
-  public static enum Field {
-    BUILD("build"),
-    EYE_COLOR("eyeColor"),
-    HAIR_COLOR("hairColor"),
-    HEIGHT("height"),
-    WEIGHT("weight");
-
-    private final String jsonString;
-
-    private Field(String jsonString) {
-      this.jsonString = jsonString;
-    }
-
-    @Override
-    public String toString() {
-      return this.jsonString;
-    }
-  }
+public class BodyTypeImpl implements BodyType {
 
   private String build;
   private String eyeColor;

Added: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Email.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Email.java?rev=669613&view=auto
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Email.java (added)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Email.java Thu Jun 19 11:19:46 2008
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.shindig.social.opensocial.model;
+
+/**
+ * see
+ * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Email.Field.html
+ *
+ */
+public interface Email {
+
+  public static enum Field {
+    ADDRESS("address"),
+    TYPE("type");
+
+    private final String jsonString;
+
+    private Field(String jsonString) {
+      this.jsonString = jsonString;
+    }
+
+    @Override
+    public String toString() {
+      return this.jsonString;
+    }
+  }
+
+  String getAddress();
+
+  void setAddress(String address);
+
+  String getType();
+
+  void setType(String type);
+}

Copied: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/EmailImpl.java (from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Email.java)
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/EmailImpl.java?p2=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/EmailImpl.java&p1=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Email.java&r1=669311&r2=669613&rev=669613&view=diff
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Email.java (original)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/EmailImpl.java Thu Jun 19 11:19:46 2008
@@ -17,33 +17,12 @@
  */
 package org.apache.shindig.social.opensocial.model;
 
-/**
- * see
- * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Email.Field.html
- *
- */
-public class Email {
-
-  public static enum Field {
-    ADDRESS("address"),
-    TYPE("type");
-
-    private final String jsonString;
-
-    private Field(String jsonString) {
-      this.jsonString = jsonString;
-    }
-
-    @Override
-    public String toString() {
-      return this.jsonString;
-    }
-  }
+public class EmailImpl implements Email {
 
   private String address;
   private String type;
 
-  public Email(String address, String type) {
+  public EmailImpl(String address, String type) {
     this.address = address;
     this.type = type;
   }

Added: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Enum.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Enum.java?rev=669613&view=auto
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Enum.java (added)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Enum.java Thu Jun 19 11:19:46 2008
@@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.shindig.social.opensocial.model;
+
+/**
+ * see
+ * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Enum.html
+ *
+ * Base class for all Enum objects. This class allows containers to use constants
+ * for fields that have a common set of values.
+ *
+ */
+public interface Enum<E extends Enum.EnumKey> {
+
+  public interface EnumKey {
+    String getDisplayValue();
+  }
+
+  /**
+   * public java.lang.Enum for opensocial.Enum.Drinker
+   */
+  public enum Drinker implements EnumKey {
+    HEAVILY("HEAVILY", "Heavily"),
+    NO("NO", "No"),
+    OCCASIONALLY("OCCASIONALLY", "Occasionally"),
+    QUIT("QUIT", "Quit"),
+    QUITTING("QUITTING", "Quitting"),
+    REGULARLY("REGULARLY", "Regularly"),
+    SOCIALLY("SOCIALLY", "Socially"),
+    YES("YES", "Yes");
+
+    private final String jsonString;
+    private final String displayValue;
+
+    private Drinker(String jsonString, String displayValue) {
+      this.jsonString = jsonString;
+      this.displayValue = displayValue;
+    }
+
+    @Override
+    public String toString() {
+      return this.jsonString;
+    }
+
+    public String getDisplayValue() {
+      return displayValue;
+    }
+  }
+
+  /**
+   * public java.lang.Enum for opensocial.Enum.Gender
+   */
+  public enum Gender implements EnumKey {
+    FEMALE("FEMALE", "Female"),
+    MALE("MALE", "Male");
+
+    private final String jsonString;
+    private final String displayValue;
+
+    private Gender(String jsonString, String displayValue) {
+      this.jsonString = jsonString;
+      this.displayValue = displayValue;
+    }
+
+    @Override
+    public String toString() {
+      return this.jsonString;
+    }
+
+    public String getDisplayValue() {
+      return displayValue;
+    }
+  }
+
+  /**
+   * public java.lang.Enum for opensocial.Enum.Smoker
+   */
+  public enum Smoker implements EnumKey {
+    HEAVILY("HEAVILY", "Heavily"),
+    NO("NO", "No"),
+    OCCASIONALLY("OCCASIONALLY", "Ocasionally"),
+    QUIT("QUIT", "Quit"),
+    QUITTING("QUITTING", "Quitting"),
+    REGULARLY("REGULARLY", "Regularly"),
+    SOCIALLY("SOCIALLY", "Socially"),
+    YES("YES", "Yes");
+
+    private final String jsonString;
+    private final String displayValue;
+
+    private Smoker(String jsonString, String displayValue) {
+      this.jsonString = jsonString;
+      this.displayValue = displayValue;
+    }
+
+    @Override
+    public String toString() {
+      return this.jsonString;
+    }
+
+    public String getDisplayValue() {
+      return displayValue;
+    }
+  }
+
+  /**
+   * public java.lang.Enum for opensocial.Enum.NetworkPresence
+   */
+  public enum NetworkPresence implements EnumKey {
+    ONLINE("ONLINE", "Online"),
+    OFFLINE("OFFLINE", "Offline"),
+    AWAY("AWAY", "Away"),
+    CHAT("CHAT", "Chat"),
+    DND("DND", "Do Not Disturb"),
+    XA("XA", "Extended Away");
+
+    private final String jsonString;
+    private final String displayValue;
+
+    private NetworkPresence(String jsonString, String displayValue) {
+      this.jsonString = jsonString;
+      this.displayValue = displayValue;
+    }
+
+    @Override
+    public String toString() {
+      return this.jsonString;
+    }
+
+    public String getDisplayValue() {
+      return displayValue;
+    }
+  }
+
+  /**
+   * Gets the value of this Enum. This is the string displayed to the user.
+   * If the container supports localization, the string should be localized.
+   * @return the Enum's user visible value
+   */
+  String getDisplayValue();
+
+  /**
+   * Sets the value of this Enum. This is the string displayed to the user.
+   * If the container supports localization, the string should be localized.
+   * @param displayValue The value to set.
+   */
+  void setDisplayValue(String displayValue);
+
+  /**
+   * Gets the key for this Enum.
+   * Use this for logic within your gadget.
+   * @return java.lang.Enum key object for this Enum.
+   */
+  E getKey();
+
+  /**
+   * Sets the key for this Enum.
+   * Use this for logic within your gadget.
+   * @param key The value to set.
+   */
+  void setKey(E key);
+}

Copied: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/EnumImpl.java (from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Enum.java)
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/EnumImpl.java?p2=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/EnumImpl.java&p1=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Enum.java&r1=669311&r2=669613&rev=669613&view=diff
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Enum.java (original)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/EnumImpl.java Thu Jun 19 11:19:46 2008
@@ -17,144 +17,16 @@
  */
 package org.apache.shindig.social.opensocial.model;
 
-/**
- * see
- * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Enum.html
- *
- * Base class for all Enum objects. This class allows containers to use constants
- * for fields that have a common set of values.
- *
- */
-public final class Enum<E extends Enum.EnumKey> {
+public final class EnumImpl<E extends EnumImpl.EnumKey> implements Enum<E> {
   private String displayValue;
   private E key = null;
 
-  public interface EnumKey {
-    String getDisplayValue();
-  }
-
-  /**
-   * public java.lang.Enum for opensocial.Enum.Drinker
-   */
-  public enum Drinker implements EnumKey {
-    HEAVILY("HEAVILY", "Heavily"),
-    NO("NO", "No"),
-    OCCASIONALLY("OCCASIONALLY", "Occasionally"),
-    QUIT("QUIT", "Quit"),
-    QUITTING("QUITTING", "Quitting"),
-    REGULARLY("REGULARLY", "Regularly"),
-    SOCIALLY("SOCIALLY", "Socially"),
-    YES("YES", "Yes");
-
-    private final String jsonString;
-    private final String displayValue;
-
-    private Drinker(String jsonString, String displayValue) {
-      this.jsonString = jsonString;
-      this.displayValue = displayValue;
-    }
-
-    @Override
-    public String toString() {
-      return this.jsonString;
-    }
-
-    public String getDisplayValue() {
-      return displayValue;
-    }
-  }
-
-  /**
-   * public java.lang.Enum for opensocial.Enum.Gender
-   */
-  public enum Gender implements EnumKey {
-    FEMALE("FEMALE", "Female"),
-    MALE("MALE", "Male");
-
-    private final String jsonString;
-    private final String displayValue;
-
-    private Gender(String jsonString, String displayValue) {
-      this.jsonString = jsonString;
-      this.displayValue = displayValue;
-    }
-
-    @Override
-    public String toString() {
-      return this.jsonString;
-    }
-
-    public String getDisplayValue() {
-      return displayValue;
-    }
-  }
-
-  /**
-   * public java.lang.Enum for opensocial.Enum.Smoker
-   */
-  public enum Smoker implements EnumKey {
-    HEAVILY("HEAVILY", "Heavily"),
-    NO("NO", "No"),
-    OCCASIONALLY("OCCASIONALLY", "Ocasionally"),
-    QUIT("QUIT", "Quit"),
-    QUITTING("QUITTING", "Quitting"),
-    REGULARLY("REGULARLY", "Regularly"),
-    SOCIALLY("SOCIALLY", "Socially"),
-    YES("YES", "Yes");
-
-    private final String jsonString;
-    private final String displayValue;
-
-    private Smoker(String jsonString, String displayValue) {
-      this.jsonString = jsonString;
-      this.displayValue = displayValue;
-    }
-
-    @Override
-    public String toString() {
-      return this.jsonString;
-    }
-
-    public String getDisplayValue() {
-      return displayValue;
-    }
-  }
-
-  /**
-   * public java.lang.Enum for opensocial.Enum.NetworkPresence
-   */
-  public enum NetworkPresence implements EnumKey {
-    ONLINE("ONLINE", "Online"),
-    OFFLINE("OFFLINE", "Offline"),
-    AWAY("AWAY", "Away"),
-    CHAT("CHAT", "Chat"),
-    DND("DND", "Do Not Disturb"),
-    XA("XA", "Extended Away");
-
-    private final String jsonString;
-    private final String displayValue;
-
-    private NetworkPresence(String jsonString, String displayValue) {
-      this.jsonString = jsonString;
-      this.displayValue = displayValue;
-    }
-
-    @Override
-    public String toString() {
-      return this.jsonString;
-    }
-
-    public String getDisplayValue() {
-      return displayValue;
-    }
-  }
-
   /**
    * Constructs a Enum object.
    * @param key EnumKey The key to use
    * @param displayValue String The display value
    */
-  public Enum(E key, String displayValue) {
+  public EnumImpl(E key, String displayValue) {
     this.key = key;
     this.displayValue = displayValue;
   }
@@ -164,42 +36,22 @@
    * @param key The key to use. Will use the value from getDisplayValue() as
    *     the display value.
    */
-  public Enum(E key) {
+  public EnumImpl(E key) {
     this(key, key.getDisplayValue());
   }
 
-  /**
-   * Gets the value of this Enum. This is the string displayed to the user.
-   * If the container supports localization, the string should be localized.
-   * @return the Enum's user visible value
-   */
   public String getDisplayValue() {
     return this.displayValue;
   }
 
-  /**
-   * Sets the value of this Enum. This is the string displayed to the user.
-   * If the container supports localization, the string should be localized.
-   * @param displayValue The value to set.
-   */
   public void setDisplayValue(String displayValue) {
     this.displayValue = displayValue;
   }
 
-  /**
-   * Gets the key for this Enum.
-   * Use this for logic within your gadget.
-   * @return java.lang.Enum key object for this Enum.
-   */
   public E getKey() {
     return this.key;
   }
 
-  /**
-   * Sets the key for this Enum.
-   * Use this for logic within your gadget.
-   * @param key The value to set.
-   */
   public void setKey(E key) {
     this.key = key;
   }

Added: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/MediaItem.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/MediaItem.java?rev=669613&view=auto
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/MediaItem.java (added)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/MediaItem.java Thu Jun 19 11:19:46 2008
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.shindig.social.opensocial.model;
+
+public interface MediaItem {
+
+  public static enum Field {
+    MIME_TYPE("mimeType"),
+    TYPE("type"),
+    URL("url");
+
+    private final String jsonString;
+
+    private Field(String jsonString) {
+      this.jsonString = jsonString;
+    }
+
+    @Override
+    public String toString() {
+      return this.jsonString;
+    }
+  }
+
+  public enum Type {
+    AUDIO("audio"),
+    IMAGE("image"),
+    VIDEO("video");
+
+    private final String jsonString;
+
+    private Type(String jsonString) {
+      this.jsonString = jsonString;
+    }
+
+    @Override
+    public String toString() {
+      return this.jsonString;
+    }
+  }
+
+  String getMimeType();
+
+  void setMimeType(String mimeType);
+
+  Type getType();
+
+  void setType(Type type);
+
+  String getUrl();
+
+  void setUrl(String url);
+
+}

Copied: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/MediaItemImpl.java (from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/MediaItem.java)
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/MediaItemImpl.java?p2=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/MediaItemImpl.java&p1=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/MediaItem.java&r1=669311&r2=669613&rev=669613&view=diff
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/MediaItem.java (original)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/MediaItemImpl.java Thu Jun 19 11:19:46 2008
@@ -22,50 +22,16 @@
  * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Activity.MediaItem.Field.html
  *
  */
-public class MediaItem {
-
-  public static enum Field {
-    MIME_TYPE("mimeType"),
-    TYPE("type"),
-    URL("url");
-
-    private final String jsonString;
-
-    private Field(String jsonString) {
-      this.jsonString = jsonString;
-    }
-
-    @Override
-    public String toString() {
-      return this.jsonString;
-    }
-  }
+public class MediaItemImpl implements MediaItem {
 
   private String mimeType;
   private Type type;
   private String url;
 
-  public enum Type {
-    AUDIO("audio"),
-    IMAGE("image"),
-    VIDEO("video");
-
-    private final String jsonString;
-
-    private Type(String jsonString) {
-      this.jsonString = jsonString;
-    }
-
-    @Override
-    public String toString() {
-      return this.jsonString;
-    }
-  }
-
-  public MediaItem() {
+  public MediaItemImpl() {
   }
 
-  public MediaItem(String mimeType, Type type, String url) {
+  public MediaItemImpl(String mimeType, Type type, String url) {
     this.mimeType = mimeType;
     this.type = type;
     this.url = url;

Added: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Message.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Message.java?rev=669613&view=auto
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Message.java (added)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Message.java Thu Jun 19 11:19:46 2008
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.shindig.social.opensocial.model;
+
+/**
+ *
+ * Base interface for all message objects.
+ *
+ * see
+ * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Message.html
+ *
+ */
+public interface Message {
+
+  public static enum Field {
+    BODY("body"),
+    TITLE("title"),
+    TYPE("type");
+
+    private final String jsonString;
+
+    private Field(String jsonString) {
+      this.jsonString = jsonString;
+    }
+
+    @Override
+    public String toString() {
+      return this.jsonString;
+    }
+  }
+
+  public enum Type {
+    /* An email */
+    EMAIL("EMAIL"),
+    /* A short private message */
+    NOTIFICATION("NOTIFICATION"),
+    /* A message to a specific user that can be seen only by that user */
+    PRIVATE_MESSAGE("PRIVATE_MESSAGE"),
+    /* A message to a specific user that can be seen by more than that user */
+    PUBLIC_MESSAGE("PUBLIC_MESSAGE");
+
+    private final String jsonString;
+
+    private Type(String jsonString) {
+      this.jsonString = jsonString;
+    }
+
+    @Override
+    public String toString() {
+      return this.jsonString;
+    }
+  }
+
+  /**
+   * Gets the main text of the message.
+   * @return the main text of the message
+   */
+  String getBody();
+
+  /**
+   * Sets the main text of the message.
+   * HTML attributes are allowed and are sanitized by the container
+   * @param newBody the main text of the message
+   */
+  void setBody(String newBody);
+
+  /**
+   * Gets the title of the message
+   * @return the title of the message
+   */
+  String getTitle();
+
+  /**
+   * Sets the title of the message
+   * HTML attributes are allowed and are sanitized by the container.
+   * @param newTitle the title of the message
+   */
+  void setTitle(String newTitle);
+
+  /**
+   * Gets the type of the message, as specified by opensocial.Message.Type
+   * @return the type of message (enum Message.Type)
+   */
+  Type getType();
+
+  /**
+   * Sets the type of the message, as specified by opensocial.Message.Type
+   * @param newType the type of message (enum Message.Type)
+   */
+  void setType(Type newType);
+
+  /**
+   * TODO implement either a standard 'sanitizing' facility or
+   * define an interface that can be set on this class so
+   * others can plug in their own.
+   * @param htmlStr String to be sanitized.
+   * @return the sanitized HTML String
+   */
+  String sanitizeHTML(String htmlStr);
+}

Copied: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/MessageImpl.java (from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Message.java)
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/MessageImpl.java?p2=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/MessageImpl.java&p1=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Message.java&r1=669311&r2=669613&rev=669613&view=diff
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Message.java (original)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/MessageImpl.java Thu Jun 19 11:19:46 2008
@@ -17,122 +17,42 @@
  */
 package org.apache.shindig.social.opensocial.model;
 
-/**
- *
- * Base interface for all message objects.
- *
- * see
- * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Message.html
- *
- */
-public final class Message {
-
-  public static enum Field {
-    BODY("body"),
-    TITLE("title"),
-    TYPE("type");
-
-    private final String jsonString;
-
-    private Field(String jsonString) {
-      this.jsonString = jsonString;
-    }
-
-    @Override
-    public String toString() {
-      return this.jsonString;
-    }
-  }
+public final class MessageImpl implements Message {
 
   private String body;
   private String title;
   private Type type;
 
-  public enum Type {
-    /* An email */
-    EMAIL("EMAIL"),
-    /* A short private message */
-    NOTIFICATION("NOTIFICATION"),
-    /* A message to a specific user that can be seen only by that user */
-    PRIVATE_MESSAGE("PRIVATE_MESSAGE"),
-    /* A message to a specific user that can be seen by more than that user */
-    PUBLIC_MESSAGE("PUBLIC_MESSAGE");
-
-    private final String jsonString;
-
-    private Type(String jsonString) {
-      this.jsonString = jsonString;
-    }
-
-    @Override
-    public String toString() {
-      return this.jsonString;
-    }
-  }
-
-  public Message(String initBody, String initTitle, Type initType) {
+  public MessageImpl(String initBody, String initTitle, Type initType) {
     this.body = initBody;
     this.title = initTitle;
     this.type = initType;
   }
 
-  /**
-   * Gets the main text of the message.
-   * @return the main text of the message
-   */
   public String getBody() {
     return this.body;
   }
 
-  /**
-   * Sets the main text of the message.
-   * HTML attributes are allowed and are sanitized by the container
-   * @param newBody the main text of the message
-   */
   public void setBody(String newBody) {
     this.body = newBody;
   }
 
-  /**
-   * Gets the title of the message
-   * @return the title of the message
-   */
   public String getTitle() {
     return this.title;
   }
 
-  /**
-   * Sets the title of the message
-   * HTML attributes are allowed and are sanitized by the container.
-   * @param newTitle the title of the message
-   */
   public void setTitle(String newTitle) {
     this.title = newTitle;
   }
 
-  /**
-   * Gets the type of the message, as specified by opensocial.Message.Type
-   * @return the type of message (enum Message.Type)
-   */
   public Type getType() {
     return type;
   }
 
-  /**
-   * Sets the type of the message, as specified by opensocial.Message.Type
-   * @param newType the type of message (enum Message.Type)
-   */
   public void setType(Type newType) {
     this.type = newType;
   }
 
-  /**
-   * TODO implement either a standard 'sanitizing' facility or
-   * define an interface that can be set on this class so
-   * others can plug in their own.
-   * @param htmlStr String to be sanitized.
-   * @return the sanitized HTML String
-   */
   public String sanitizeHTML(String htmlStr) {
     return htmlStr;
   }

Added: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Name.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Name.java?rev=669613&view=auto
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Name.java (added)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Name.java Thu Jun 19 11:19:46 2008
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.shindig.social.opensocial.model;
+
+/**
+ * see
+ * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Name.Field.html
+ *
+ */
+public interface Name {
+
+  public static enum Field {
+    ADDITIONAL_NAME("additionalName"),
+    FAMILY_NAME("familyName"),
+    GIVEN_NAME("givenName"),
+    HONORIFIC_PREFIX("honorificPrefix"),
+    HONORIFIC_SUFFIX("honorificSuffix"),
+    UNSTRUCTURED("unstructured");
+
+    private final String jsonString;
+
+    private Field(String jsonString) {
+      this.jsonString = jsonString;
+    }
+
+    @Override
+    public String toString() {
+      return this.jsonString;
+    }
+  }
+
+  String getUnstructured();
+
+  void setUnstructured(String unstructured);
+
+  String getAdditionalName();
+
+  void setAdditionalName(String additionalName);
+
+  String getFamilyName();
+
+  void setFamilyName(String familyName);
+
+  String getGivenName();
+
+  void setGivenName(String givenName);
+
+  String getHonorificPrefix();
+
+  void setHonorificPrefix(String honorificPrefix);
+
+  String getHonorificSuffix();
+
+  void setHonorificSuffix(String honorificSuffix);
+}

Copied: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/NameImpl.java (from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Name.java)
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/NameImpl.java?p2=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/NameImpl.java&p1=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Name.java&r1=669311&r2=669613&rev=669613&view=diff
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Name.java (original)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/NameImpl.java Thu Jun 19 11:19:46 2008
@@ -17,32 +17,7 @@
  */
 package org.apache.shindig.social.opensocial.model;
 
-/**
- * see
- * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Name.Field.html
- *
- */
-public class Name {
-
-  public static enum Field {
-    ADDITIONAL_NAME("additionalName"),
-    FAMILY_NAME("familyName"),
-    GIVEN_NAME("givenName"),
-    HONORIFIC_PREFIX("honorificPrefix"),
-    HONORIFIC_SUFFIX("honorificSuffix"),
-    UNSTRUCTURED("unstructured");
-
-    private final String jsonString;
-
-    private Field(String jsonString) {
-      this.jsonString = jsonString;
-    }
-
-    @Override
-    public String toString() {
-      return this.jsonString;
-    }
-  }
+public class NameImpl implements Name {
 
   private String additionalName;
   private String familyName;
@@ -51,7 +26,7 @@
   private String honorificSuffix;
   private String unstructured;
 
-  public Name(String unstructured) {
+  public NameImpl(String unstructured) {
     this.unstructured = unstructured;
   }
 

Added: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Organization.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Organization.java?rev=669613&view=auto
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Organization.java (added)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Organization.java Thu Jun 19 11:19:46 2008
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.shindig.social.opensocial.model;
+
+import java.util.Date;
+
+/**
+ * see
+ * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Organization.Field.html
+ *
+ */
+public interface Organization {
+  
+  public static enum Field {
+    ADDRESS("address"),
+    DESCRIPTION("description"),
+    END_DATE("endDate"),
+    FIELD("field"),
+    NAME("name"),
+    SALARY("salary"),
+    START_DATE("startDate"),
+    SUB_FIELD("subField"),
+    TITLE("title"),
+    WEBPAGE("webpage");
+
+    private final String jsonString;
+
+    private Field(String jsonString) {
+      this.jsonString = jsonString;
+    }
+
+    @Override
+    public String toString() {
+      return this.jsonString;
+    }
+  }
+
+  Address getAddress();
+
+  void setAddress(Address address);
+
+  String getDescription();
+
+  void setDescription(String description);
+
+  Date getEndDate();
+
+  void setEndDate(Date endDate);
+
+  String getField();
+
+  void setField(String field);
+
+  String getName();
+
+  void setName(String name);
+
+  String getSalary();
+
+  void setSalary(String salary);
+
+  Date getStartDate();
+
+  void setStartDate(Date startDate);
+
+  String getSubField();
+
+  void setSubField(String subField);
+
+  String getTitle();
+
+  void setTitle(String title);
+
+  String getWebpage();
+
+  void setWebpage(String webpage);
+
+}

Copied: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/OrganizationImpl.java (from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Organization.java)
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/OrganizationImpl.java?p2=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/OrganizationImpl.java&p1=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Organization.java&r1=669311&r2=669613&rev=669613&view=diff
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Organization.java (original)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/OrganizationImpl.java Thu Jun 19 11:19:46 2008
@@ -19,36 +19,7 @@
 
 import java.util.Date;
 
-/**
- * see
- * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Organization.Field.html
- *
- */
-public class Organization {
-
-  public static enum Field {
-    ADDRESS("address"),
-    DESCRIPTION("description"),
-    END_DATE("endDate"),
-    FIELD("field"),
-    NAME("name"),
-    SALARY("salary"),
-    START_DATE("startDate"),
-    SUB_FIELD("subField"),
-    TITLE("title"),
-    WEBPAGE("webpage");
-
-    private final String jsonString;
-
-    private Field(String jsonString) {
-      this.jsonString = jsonString;
-    }
-
-    @Override
-    public String toString() {
-      return this.jsonString;
-    }
-  }
+public class OrganizationImpl implements Organization {
 
   private Address address;
   private String description;

Added: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Person.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Person.java?rev=669613&view=auto
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Person.java (added)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Person.java Thu Jun 19 11:19:46 2008
@@ -0,0 +1,332 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.shindig.social.opensocial.model;
+
+import java.util.List;
+import java.util.Date;
+
+/**
+ * see
+ * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Person.Field.html
+ *
+ */
+public interface Person {
+
+  public static enum Field {
+    ABOUT_ME("aboutMe"),
+    ACTIVITIES("activities"),
+    ADDRESSES("addresses"),
+    AGE("age"),
+    BODY_TYPE("bodyType"),
+    BOOKS("books"),
+    CARS("cars"),
+    CHILDREN("children"),
+    CURRENT_LOCATION("currentLocation"),
+    DATE_OF_BIRTH("dateOfBirth"),
+    DRINKER("drinker"),
+    EMAILS("emails"),
+    ETHNICITY("ethnicity"),
+    FASHION("fashion"),
+    FOOD("food"),
+    GENDER("gender"),
+    HAPPIEST_WHEN("happiestWhen"),
+    HAS_APP("hasApp"),
+    HEROES("heroes"),
+    HUMOR("humor"),
+    ID("id"),
+    INTERESTS("interests"),
+    JOB_INTERESTS("jobInterests"),
+    JOBS("jobs"),
+    LANGUAGES_SPOKEN("languagesSpoken"),
+    LAST_UPDATED("updated"),
+    LIVING_ARRANGEMENT("livingArrangement"),
+    LOOKING_FOR("lookingFor"),
+    MOVIES("movies"),
+    MUSIC("music"),
+    NAME("name"),
+    NETWORKPRESENCE("networkPresence"),
+    NICKNAME("nickname"),
+    PETS("pets"),
+    PHONE_NUMBERS("phoneNumbers"),
+    POLITICAL_VIEWS("politicalViews"),
+    PROFILE_SONG("profileSong"),
+    PROFILE_URL("profileUrl"),
+    PROFILE_VIDEO("profileVideo"),
+    QUOTES("quotes"),
+    RELATIONSHIP_STATUS("relationshipStatus"),
+    RELIGION("religion"),
+    ROMANCE("romance"),
+    SCARED_OF("scaredOf"),
+    SCHOOLS("schools"),
+    SEXUAL_ORIENTATION("sexualOrientation"),
+    SMOKER("smoker"),
+    SPORTS("sports"),
+    STATUS("status"),
+    TAGS("tags"),
+    THUMBNAIL_URL("thumbnailUrl"),
+    TIME_ZONE("timeZone"),
+    TURN_OFFS("turnOffs"),
+    TURN_ONS("turnOns"),
+    TV_SHOWS("tvShows"),
+    URLS("urls");
+
+    private final String jsonString;
+
+    private Field(String jsonString) {
+      this.jsonString = jsonString;
+    }
+
+    @Override
+    public String toString() {
+      return this.jsonString;
+    }
+  }
+  
+  String getAboutMe();
+
+  void setAboutMe(String aboutMe);
+
+  List<String> getActivities();
+
+  void setActivities(List<String> activities);
+
+  List<Address> getAddresses();
+
+  void setAddresses(List<Address> addresses);
+
+  Integer getAge();
+
+  void setAge(Integer age);
+
+  BodyType getBodyType();
+
+  void setBodyType(BodyType bodyType);
+
+  List<String> getBooks();
+
+  void setBooks(List<String> books);
+
+  List<String> getCars();
+
+  void setCars(List<String> cars);
+
+  String getChildren();
+
+  void setChildren(String children);
+
+  Address getCurrentLocation();
+
+  void setCurrentLocation(Address currentLocation);
+
+  Date getDateOfBirth();
+
+  void setDateOfBirth(Date dateOfBirth);
+
+  Enum<Enum.Drinker> getDrinker();
+
+  void setDrinker(Enum<Enum.Drinker> newDrinker);
+
+  List<Email> getEmails();
+
+  void setEmails(List<Email> emails);
+
+  String getEthnicity();
+
+  void setEthnicity(String ethnicity);
+
+  String getFashion();
+
+  void setFashion(String fashion);
+
+  List<String> getFood();
+
+  void setFood(List<String> food);
+
+  Enum<Enum.Gender> getGender();
+
+  void setGender(Enum<Enum.Gender> newGender);
+
+  String getHappiestWhen();
+
+  void setHappiestWhen(String happiestWhen);
+
+  Boolean getHasApp();
+
+  void setHasApp(Boolean hasApp);
+
+  List<String> getHeroes();
+
+  void setHeroes(List<String> heroes);
+
+  String getHumor();
+
+  void setHumor(String humor);
+
+  String getId();
+
+  void setId(String id);
+
+  List<String> getInterests();
+
+  void setInterests(List<String> interests);
+
+  String getJobInterests();
+
+  void setJobInterests(String jobInterests);
+
+  List<Organization> getJobs();
+
+  void setJobs(List<Organization> jobs);
+
+  List<String> getLanguagesSpoken();
+
+  void setLanguagesSpoken(List<String> languagesSpoken);
+
+  Date getUpdated();
+
+  void setUpdated(Date updated);
+
+  String getLivingArrangement();
+
+  void setLivingArrangement(String livingArrangement);
+
+  String getLookingFor();
+
+  void setLookingFor(String lookingFor);
+
+  List<String> getMovies();
+
+  void setMovies(List<String> movies);
+
+  List<String> getMusic();
+
+  void setMusic(List<String> music);
+
+  Name getName();
+
+  void setName(Name name);
+
+  Enum<Enum.NetworkPresence> getNetworkPresence();
+
+  void setNetworkPresence(Enum<Enum.NetworkPresence> networkPresence);
+
+  String getNickname();
+
+  void setNickname(String nickname);
+
+  String getPets();
+
+  void setPets(String pets);
+
+  List<Phone> getPhoneNumbers();
+
+  void setPhoneNumbers(List<Phone> phoneNumbers);
+
+  String getPoliticalViews();
+
+  void setPoliticalViews(String politicalViews);
+
+  Url getProfileSong();
+
+  void setProfileSong(Url profileSong);
+
+  String getProfileUrl();
+
+  void setProfileUrl(String profileUrl);
+
+  Url getProfileVideo();
+
+  void setProfileVideo(Url profileVideo);
+
+  List<String> getQuotes();
+
+  void setQuotes(List<String> quotes);
+
+  String getRelationshipStatus();
+
+  void setRelationshipStatus(String relationshipStatus);
+
+  String getReligion();
+
+  void setReligion(String religion);
+
+  String getRomance();
+
+  void setRomance(String romance);
+
+  String getScaredOf();
+
+  void setScaredOf(String scaredOf);
+
+  List<Organization> getSchools();
+
+  void setSchools(List<Organization> schools);
+
+  String getSexualOrientation();
+
+  void setSexualOrientation(String sexualOrientation);
+
+  Enum<Enum.Smoker> getSmoker();
+
+  void setSmoker(Enum<Enum.Smoker> newSmoker);
+
+  List<String> getSports();
+
+  void setSports(List<String> sports);
+
+  String getStatus();
+
+  void setStatus(String status);
+
+  List<String> getTags();
+
+  void setTags(List<String> tags);
+
+  String getThumbnailUrl();
+
+  void setThumbnailUrl(String thumbnailUrl);
+
+  Long getTimeZone();
+
+  void setTimeZone(Long timeZone);
+
+  List<String> getTurnOffs();
+
+  void setTurnOffs(List<String> turnOffs);
+
+  List<String> getTurnOns();
+
+  void setTurnOns(List<String> turnOns);
+
+  List<String> getTvShows();
+
+  void setTvShows(List<String> tvShows);
+
+  List<Url> getUrls();
+
+  void setUrls(List<Url> urls);
+
+  boolean getIsOwner();
+
+  void setIsOwner(boolean isOwner);
+
+  boolean getIsViewer();
+
+  void setIsViewer(boolean isViewer);
+
+}

Copied: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/PersonImpl.java (from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Person.java)
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/PersonImpl.java?p2=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/PersonImpl.java&p1=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Person.java&r1=669311&r2=669613&rev=669613&view=diff
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Person.java (original)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/PersonImpl.java Thu Jun 19 11:19:46 2008
@@ -20,83 +20,7 @@
 import java.util.Date;
 import java.util.List;
 
-/**
- * see
- * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Person.Field.html
- *
- */
-public class Person {
-
-  public static enum Field {
-    ABOUT_ME("aboutMe"),
-    ACTIVITIES("activities"),
-    ADDRESSES("addresses"),
-    AGE("age"),
-    BODY_TYPE("bodyType"),
-    BOOKS("books"),
-    CARS("cars"),
-    CHILDREN("children"),
-    CURRENT_LOCATION("currentLocation"),
-    DATE_OF_BIRTH("dateOfBirth"),
-    DRINKER("drinker"),
-    EMAILS("emails"),
-    ETHNICITY("ethnicity"),
-    FASHION("fashion"),
-    FOOD("food"),
-    GENDER("gender"),
-    HAPPIEST_WHEN("happiestWhen"),
-    HAS_APP("hasApp"),
-    HEROES("heroes"),
-    HUMOR("humor"),
-    ID("id"),
-    INTERESTS("interests"),
-    JOB_INTERESTS("jobInterests"),
-    JOBS("jobs"),
-    LANGUAGES_SPOKEN("languagesSpoken"),
-    LAST_UPDATED("updated"),
-    LIVING_ARRANGEMENT("livingArrangement"),
-    LOOKING_FOR("lookingFor"),
-    MOVIES("movies"),
-    MUSIC("music"),
-    NAME("name"),
-    NETWORKPRESENCE("networkPresence"),
-    NICKNAME("nickname"),
-    PETS("pets"),
-    PHONE_NUMBERS("phoneNumbers"),
-    POLITICAL_VIEWS("politicalViews"),
-    PROFILE_SONG("profileSong"),
-    PROFILE_URL("profileUrl"),
-    PROFILE_VIDEO("profileVideo"),
-    QUOTES("quotes"),
-    RELATIONSHIP_STATUS("relationshipStatus"),
-    RELIGION("religion"),
-    ROMANCE("romance"),
-    SCARED_OF("scaredOf"),
-    SCHOOLS("schools"),
-    SEXUAL_ORIENTATION("sexualOrientation"),
-    SMOKER("smoker"),
-    SPORTS("sports"),
-    STATUS("status"),
-    TAGS("tags"),
-    THUMBNAIL_URL("thumbnailUrl"),
-    TIME_ZONE("timeZone"),
-    TURN_OFFS("turnOffs"),
-    TURN_ONS("turnOns"),
-    TV_SHOWS("tvShows"),
-    URLS("urls");
-
-    private final String jsonString;
-
-    private Field(String jsonString) {
-      this.jsonString = jsonString;
-    }
-
-    @Override
-    public String toString() {
-      return this.jsonString;
-    }
-  }
-
+public class PersonImpl implements Person {
   private String aboutMe;
   private List<String> activities;
   private List<Address> addresses;
@@ -158,7 +82,7 @@
   private boolean isOwner = false;
   private boolean isViewer = false;
 
-  public Person(String id, Name name) {
+  public PersonImpl(String id, Name name) {
     this.id = id;
     this.name = name;
   }

Added: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Phone.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Phone.java?rev=669613&view=auto
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Phone.java (added)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Phone.java Thu Jun 19 11:19:46 2008
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.shindig.social.opensocial.model;
+
+/**
+ * see
+ * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Phone.Field.html
+ *
+ */
+public interface Phone {
+
+  public static enum Field {
+    NUMBER("number"),
+    TYPE("type");
+
+    private final String jsonString;
+
+    private Field(String jsonString) {
+      this.jsonString = jsonString;
+    }
+
+    @Override
+    public String toString() {
+      return this.jsonString;
+    }
+  }
+  
+  String getNumber();
+
+  void setNumber(String number);
+
+  String getType();
+
+  void setType(String type);
+}

Copied: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/PhoneImpl.java (from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Phone.java)
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/PhoneImpl.java?p2=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/PhoneImpl.java&p1=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Phone.java&r1=669311&r2=669613&rev=669613&view=diff
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Phone.java (original)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/PhoneImpl.java Thu Jun 19 11:19:46 2008
@@ -17,33 +17,12 @@
  */
 package org.apache.shindig.social.opensocial.model;
 
-/**
- * see
- * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Phone.Field.html
- *
- */
-public class Phone {
-
-  public static enum Field {
-    NUMBER("number"),
-    TYPE("type");
-
-    private final String jsonString;
-
-    private Field(String jsonString) {
-      this.jsonString = jsonString;
-    }
-
-    @Override
-    public String toString() {
-      return this.jsonString;
-    }
-  }
+public class PhoneImpl implements Phone {
 
   private String number;
   private String type;
 
-  public Phone(String number, String type) {
+  public PhoneImpl(String number, String type) {
     super();
     this.number = number;
     this.type = type;

Added: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Url.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Url.java?rev=669613&view=auto
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Url.java (added)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Url.java Thu Jun 19 11:19:46 2008
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.shindig.social.opensocial.model;
+
+public interface Url {
+
+  public static enum Field {
+    ADDRESS("address"),
+    LINK_TEXT("linkText"),
+    TYPE("type");
+
+    private final String jsonString;
+
+    private Field(String jsonString) {
+      this.jsonString = jsonString;
+    }
+
+    @Override
+    public String toString() {
+      return this.jsonString;
+    }
+  }
+
+  String getAddress();
+
+  void setAddress(String address);
+
+  String getLinkText();
+
+  void setLinkText(String linkText);
+
+  String getType();
+
+  void setType(String type);
+}

Copied: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/UrlImpl.java (from r669311, incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Url.java)
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/UrlImpl.java?p2=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/UrlImpl.java&p1=incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Url.java&r1=669311&r2=669613&rev=669613&view=diff
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/Url.java (original)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/UrlImpl.java Thu Jun 19 11:19:46 2008
@@ -21,30 +21,13 @@
  * see
  * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Url.Field.html
  */
-public class Url {
-
-  public static enum Field {
-    ADDRESS("address"),
-    LINK_TEXT("linkText"),
-    TYPE("type");
-
-    private final String jsonString;
-
-    private Field(String jsonString) {
-      this.jsonString = jsonString;
-    }
-
-    @Override
-    public String toString() {
-      return this.jsonString;
-    }
-  }
+public class UrlImpl implements Url {
 
   private String address;
   private String linkText;
   private String type;
 
-  public Url(String address, String linkText, String type) {
+  public UrlImpl(String address, String linkText, String type) {
     this.address = address;
     this.linkText = linkText;
     this.type = type;

Modified: incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/samplecontainer/BasicPeopleService.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/samplecontainer/BasicPeopleService.java?rev=669613&r1=669612&r2=669613&view=diff
==============================================================================
--- incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/samplecontainer/BasicPeopleService.java (original)
+++ incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/samplecontainer/BasicPeopleService.java Thu Jun 19 11:19:46 2008
@@ -18,14 +18,15 @@
 package org.apache.shindig.social.samplecontainer;
 
 import org.apache.shindig.common.SecurityToken;
-import org.apache.shindig.social.ResponseItem;
 import org.apache.shindig.social.ResponseError;
+import org.apache.shindig.social.ResponseItem;
+import org.apache.shindig.social.dataservice.GroupId;
 import org.apache.shindig.social.dataservice.PersonService;
 import org.apache.shindig.social.dataservice.RestfulCollection;
-import org.apache.shindig.social.dataservice.GroupId;
 import org.apache.shindig.social.dataservice.UserId;
 import org.apache.shindig.social.opensocial.PeopleService;
 import org.apache.shindig.social.opensocial.model.ApiCollection;
+import org.apache.shindig.social.opensocial.model.ApiCollectionImpl;
 import org.apache.shindig.social.opensocial.model.IdSpec;
 import org.apache.shindig.social.opensocial.model.Person;
 
@@ -94,7 +95,7 @@
     int last = first + max;
     people = people.subList(first, Math.min(last, totalSize));
 
-    ApiCollection<Person> collection = new ApiCollection<Person>(people, first,
+    ApiCollection<Person> collection = new ApiCollectionImpl<Person>(people, first,
         totalSize);
     return new ResponseItem<ApiCollection<Person>>(collection);
   }