Author: ieb
Date: Thu Jul 24 04:54:24 2008
New Revision: 679376
URL: http://svn.apache.org/viewvc?rev=679376&view=rev
Log:
More Javadoc on the model, some fixes to the doc in person.
Modified:
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/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/Person.java
Modified:
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=679376&r1=679375&r2=679376&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/Activity.java
Thu Jul 24 04:54:24 2008
@@ -9,7 +9,7 @@
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
+ * Unless OPTIONAL 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
@@ -24,118 +24,461 @@
import java.util.List;
import java.util.Map;
[EMAIL PROTECTED](ActivityImpl.class)
-
/**
- * see
- *
http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Activity.Field
- * for all field meanings. All fields are represented in the js api at this
time except for
- * lastUpdated. This field is currently only in the RESTful spec.
+ * see
http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Activity.Field
for all
+ * field meanings. All fields are represented in the js api at this time
except for lastUpdated.
+ * This field is currently only in the RESTful spec.
+ *
+ * <p>
+ * Representation of an activity.
+ * <p>
+ * </p>
+ * Activities are rendered with a title and an optional activity body.
+ * <p>
+ * </p>
+ * You may set the title and body directly as strings when calling
opensocial.newActivity. However,
+ * it is usually beneficial to create activities using Message Templates for
the title and body.
+ * <p>
+ * </p>
+ * Users will have many activities in their activity streams, and containers
will not show every
+ * activity that is visible to a user. To help display large numbers of
activities, containers will
+ * summarize a list of activities from a given source to a single entry.
+ * <p>
+ * </p>
+ * You can provide Activity Summaries to customize the text shown when
multiple activities are
+ * summarized. If no customization is provided, a container may ignore your
activities altogether or
+ * provide default text such as "Bob changed his status message + 20 other
events like this."
+ * <ul>
+ * <li> Activity Summaries will always summarize around a specific key in a
key/value pair. This is
+ * so that the summary can say something concrete (this is clearer in the
example below). </li>
+ * <li> Other variables will have synthetic "Count" variables created with the
total number of items
+ * summarized. </li>
+ * <li> Message ID of the summary is the message ID of the main template + ":"
+ the data key </li>
+ * </ul>
+ *
+ * <code><pre>
+ * <messagebundle>
+ * <msg name="LISTEN_TO_THIS_SONG:Artist">
+ * ${Subject.Count} of your friends have suggested listening to songs
+ * by ${Artist}!
+ * </msg>
+ * <msg name="LISTEN_TO_THIS_SONG:Song">
+ * ${Subject.Count} of your friends have suggested listening to ${Song}
+ * !</msg>
+ * <msg name="LISTEN_TO_THIS_SONG:Subject">
+ * ${Subject.DisplayName} has recommended ${Song.Count} songs to you.
+ * </msg>
+ * </messagebundle>
+ * </pre></code>
*
*/
[EMAIL PROTECTED](ActivityImpl.class)
public interface Activity {
+ /**
+ * The fields that represent the activity object ion json form.
+ *
+ * <p>
+ * All of the fields that activities can have.
+ * </p>
+ * <p>
+ * It is only OPTIONAL to set one of TITLE_ID or TITLE. In addition, if you
are using any
+ * variables in your title or title template, you must set TEMPLATE_PARAMS.
+ * </p>
+ * <p>
+ * Other possible fields to set are: URL, MEDIA_ITEMS, BODY_ID, BODY,
EXTERNAL_ID, PRIORITY,
+ * STREAM_TITLE, STREAM_URL, STREAM_SOURCE_URL, and STREAM_FAVICON_URL.
+ * </p>
+ * <p>
+ * Containers are only OPTIONAL to use TITLE_ID or TITLE, they may ignore
additional parameters.
+ * </p>
+ *
+ */
public static enum Field {
+ /** the json field for appId. */
APP_ID("appId"),
+ /** the json field for body. */
BODY("body"),
+ /** the json field for bodyId. */
BODY_ID("bodyId"),
+ /** the json field for externalId. */
EXTERNAL_ID("externalId"),
+ /** the json field for id. */
ID("id"),
- LAST_UPDATED("updated"), /** Needed to support the RESTful api **/
+ /** the json field for updated. */
+ LAST_UPDATED("updated"), /* Needed to support the RESTful api */
+ /** the json field for mediaItems. */
MEDIA_ITEMS("mediaItems"),
+ /** the json field for postedTime. */
POSTED_TIME("postedTime"),
+ /** the json field for priority. */
PRIORITY("priority"),
+ /** the json field for streamFaviconUrl. */
STREAM_FAVICON_URL("streamFaviconUrl"),
+ /** the json field for streamSourceUrl. */
STREAM_SOURCE_URL("streamSourceUrl"),
+ /** the json field for streamTitle. */
STREAM_TITLE("streamTitle"),
+ /** the json field for streamUrl. */
STREAM_URL("streamUrl"),
+ /** the json field for templateParams. */
TEMPLATE_PARAMS("templateParams"),
+ /** the json field for title. */
TITLE("title"),
+ /** the json field for titleId. */
TITLE_ID("titleId"),
+ /** the json field for url. */
URL("url"),
+ /** the json field for userId. */
USER_ID("userId");
+ /**
+ * The json field that the instance represents.
+ */
private final String jsonString;
+ /**
+ * create a field base on the a json element.
+ *
+ * @param jsonString the name of the element
+ */
private Field(String jsonString) {
this.jsonString = jsonString;
}
+ /**
+ * emit the field as a json element.
+ *
+ * @return the field name
+ */
@Override
public String toString() {
return jsonString;
}
}
+ /**
+ * Get a string specifying the application that this activity is associated
with. Container
+ * support for this field is REQUIRED.
+ *
+ * @return A string specifying the application that this activity is
associated with
+ */
String getAppId();
+ /**
+ * Set a string specifying the application that this activity is associated
with. Container
+ * support for this field is REQUIRED.
+ *
+ * @param appId A string specifying the application that this activity is
associated with
+ */
void setAppId(String appId);
+ /**
+ * Get a string specifying an optional expanded version of an activity.
Container support for this
+ * field is OPTIONAL.
+ *
+ * @return a string specifying an optional expanded version of an activity.
+ */
String getBody();
+ /**
+ * Set a string specifying an optional expanded version of an activity.
Container support for this
+ * field is OPTIONAL.
+ *
+ * Bodies may only have the following HTML tags:<b> <i>,
<a>, <span>. The
+ * container may ignore this formatting when rendering the activity.
+ *
+ *
+ * @param body a string specifying an optional expanded version of an
activity.
+ */
void setBody(String body);
+ /**
+ * Get a string specifying the body template message ID in the gadget spec.
Container support for
+ * this field is OPTIONAL.
+ *
+ * Bodies may only have the following HTML tags: <b> <i>,
<a>, <span>. The
+ * container may ignore this formatting when rendering the activity.
+ *
+ * @return a string specifying the body template message ID in the gadget
spec.
+ */
String getBodyId();
+ /**
+ * Set a string specifying the body template message ID in the gadget spec.
Container support for
+ * this field is OPTIONAL.
+ *
+ * @param bodyId a string specifying the body template message ID in the
gadget spec.
+ */
void setBodyId(String bodyId);
+ /**
+ * Get an optional string ID generated by the posting application. Container
support for this
+ * field is OPTIONAL.
+ *
+ * @return An optional string ID generated by the posting application.
+ */
String getExternalId();
+ /**
+ * Set an optional string ID generated by the posting application. Container
support for this
+ * field is OPTIONAL.
+ *
+ * @param externalId An optional string ID generated by the posting
application.
+ */
void setExternalId(String externalId);
+ /**
+ * Get a string ID that is permanently associated with this activity.
Container support for this
+ * field is OPTIONAL.
+ *
+ * @return a string ID that is permanently associated with this activity.
+ */
String getId();
+ /**
+ * Set a string ID that is permanently associated with this activity.
Container support for this
+ * field is OPTIONAL.
+ *
+ * @param id a string ID that is permanently associated with this activity.
+ */
void setId(String id);
+ /**
+ * Get the last updated date of the Activity, additional to the Opensocial
specification for the
+ * REST-API. Container support for this field is OPTIONAL.
+ *
+ * @return the last updated date
+ */
Date getUpdated();
+ /**
+ * . Set the last updated date of the Activity, additional to the Opensocial
specification for the
+ * REST-API. Container support for this field is OPTIONAL.
+ *
+ * @param updated the last updated date
+ */
void setUpdated(Date updated);
+ /**
+ * Get any photos, videos, or images that should be associated with the
activity.
+ *
+ * Container support for this field is OPTIONAL.
+ *
+ * @return A List of [EMAIL PROTECTED] MediaItem} containing any photos,
videos, or images that should be
+ * associated with the activity.
+ */
List<MediaItem> getMediaItems();
+ /**
+ * Set any photos, videos, or images that should be associated with the
activity. Container
+ * support for this field is OPTIONAL.
+ *
+ * Higher priority ones are higher in the list.
+ *
+ * @param mediaItems a list of [EMAIL PROTECTED] MediaItem} to be associated
with the activity
+ */
void setMediaItems(List<MediaItem> mediaItems);
+ /**
+ * Get the time at which this activity took place in milliseconds since the
epoch. Container
+ * support for this field is OPTIONAL.
+ *
+ * Higher priority ones are higher in the list.
+ *
+ * @return The time at which this activity took place in milliseconds since
the epoch
+ */
Long getPostedTime();
+ /**
+ * Set the time at which this activity took place in milliseconds since the
epoch Container
+ * support for this field is OPTIONAL.
+ *
+ * This value can not be set by the end user.
+ *
+ * @param postedTime the time at which this activity took place in
milliseconds since the epoch
+ */
void setPostedTime(Long postedTime);
+ /**
+ * Get the priority, a number between 0 and 1 representing the relative
priority of this activity
+ * in relation to other activities from the same source. Container support
for this field is
+ * OPTIONAL.
+ *
+ * @return a number between 0 and 1 representing the relative priority of
this activity in
+ * relation to other activities from the same source
+ */
Float getPriority();
+ /**
+ * Set the priority, a number between 0 and 1 representing the relative
priority of this activity
+ * in relation to other activities from the same source. Container support
for this field is
+ * OPTIONAL.
+ *
+ * @param priority a number between 0 and 1 representing the relative
priority of this activity in
+ * relation to other activities from the same source.
+ */
void setPriority(Float priority);
+ /**
+ * Get a string specifying the URL for the stream's favicon. Container
support for this field is
+ * OPTIONAL.
+ *
+ * @return a string specifying the URL for the stream's favicon.
+ */
String getStreamFaviconUrl();
+ /**
+ * Set a string specifying the URL for the stream's favicon. Container
support for this field is
+ * OPTIONAL.
+ *
+ * @param streamFaviconUrl a string specifying the URL for the stream's
favicon.
+ */
void setStreamFaviconUrl(String streamFaviconUrl);
+ /**
+ * Get a string specifying the stream's source URL. Container support for
this field is OPTIONAL.
+ *
+ * @return a string specifying the stream's source URL.
+ */
String getStreamSourceUrl();
+ /**
+ * Set a string specifying the stream's source URL. Container support for
this field is OPTIONAL.
+ *
+ * @param streamSourceUrl a string specifying the stream's source URL.
+ */
void setStreamSourceUrl(String streamSourceUrl);
+ /**
+ * Get a string specifing the title of the stream. Container support for
this field is OPTIONAL.
+ *
+ * @return a string specifing the title of the stream.
+ */
String getStreamTitle();
+ /**
+ * Set a string specifing the title of the stream. Container support for
this field is OPTIONAL.
+ *
+ * @param streamTitle a string specifing the title of the stream.
+ */
void setStreamTitle(String streamTitle);
+ /**
+ * Get a string specifying the stream's URL. Container support for this
field is OPTIONAL.
+ *
+ * @return a string specifying the stream's URL.
+ */
String getStreamUrl();
+ /**
+ * Set a string specifying the stream's URL. Container support for this
field is OPTIONAL.
+ *
+ * @param streamUrl a string specifying the stream's URL.
+ */
void setStreamUrl(String streamUrl);
+ /**
+ * Get a map of custom key/value pairs associated with this activity.
Container support for this
+ * field is OPTIONAL.
+ *
+ * @return a map of custom key/value pairs associated with this activity.
+ */
Map<String, String> getTemplateParams();
+ /**
+ * Set a map of custom key/value pairs associated with this activity. The
data has type
+ * [EMAIL PROTECTED] Map<String, Object>}. The object may be either a String
or an [EMAIL PROTECTED] Person}. When
+ * passing in a person with key PersonKey, can use the following replacement
variables in the
+ * template:
+ * <ul>
+ * <li>PersonKey.DisplayName - Display name for the person</li>
+ * <li>PersonKey.ProfileUrl. URL of the person's profile</li>
+ * <li>PersonKey.Id - The ID of the person</li>
+ * <li>PersonKey - Container may replace with DisplayName, but may also
optionally link to the
+ * user.</li>
+ * </ul>
+ * Container support for this field is OPTIONAL.
+ *
+ * @param templateParams a map of custom key/value pairs associated with
this activity.
+ */
void setTemplateParams(Map<String, String> templateParams);
+ /**
+ * Get a string specifying the primary text of an activity. Container
support for this field is
+ * REQUIRED.
+ *
+ * Titles may only have the following HTML tags: <b> <i>,
<a>, <span>. The
+ * container may ignore this formatting when rendering the activity.
+ *
+ * @return astring specifying the primary text of an activity.
+ */
String getTitle();
+ /**
+ * Set a string specifying the primary text of an activity. Container
support for this field is
+ * REQUIRED.
+ *
+ * Titles may only have the following HTML tags: <b> <i>,
<a>, <span>. The
+ * container may ignore this formatting when rendering the activity.
+ *
+ * @param title a string specifying the primary text of an activity.
+ */
void setTitle(String title);
+ /**
+ * Get a string specifying the title template message ID in the gadget spec.
Container support for
+ * this field is REQUIRED.
+ *
+ * The title is the primary text of an activity. Titles may only have the
following HTML tags:
+ * <<b> <i>, <a>, <span>. The container may ignore
this formatting when
+ * rendering the activity.
+ *
+ * @return a string specifying the title template message ID in the gadget
spec.
+ */
String getTitleId();
+ /**
+ * Set a string specifying the title template message ID in the gadget spec.
Container support for
+ * this field is REQUIRED.
+ *
+ * The title is the primary text of an activity. Titles may only have the
following HTML tags:
+ * <<b> <i>, <a>, <span>. The container may ignore
this formatting when
+ * rendering the activity.
+ *
+ * @param titleId a string specifying the title template message ID in the
gadget spec.
+ */
void setTitleId(String titleId);
+ /**
+ * Get a string specifying the URL that represents this activity. Container
support for this field
+ * is OPTIONAL.
+ *
+ * @return a string specifying the URL that represents this activity.
+ */
String getUrl();
+ /**
+ * Set a string specifying the URL that represents this activity. Container
support for this field
+ * is OPTIONAL.
+ *
+ * @param url a string specifying the URL that represents this activity.
+ */
void setUrl(String url);
+ /**
+ * Get a string ID of the user who this activity is for. Container support
for this field is
+ * OPTIONAL.
+ *
+ * @return a string ID of the user who this activity is for.
+ */
String getUserId();
+ /**
+ * Get a string ID of the user who this activity is for. Container support
for this field is
+ * OPTIONAL.
+ *
+ * @param userId a string ID of the user who this activity is for.
+ */
void setUserId(String userId);
}
Modified:
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=679376&r1=679375&r2=679376&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/Address.java
Thu Jul 24 04:54:24 2008
@@ -22,80 +22,220 @@
import com.google.inject.ImplementedBy;
/**
- * see
- *
http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Address.Field.html
- *
+ * Base interface for all address objects
+ * see
http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Address.Field.html.
+ *
*/
@ImplementedBy(AddressImpl.class)
-
public interface Address {
+ /**
+ * The fields that represent the address object ion json form.
+ */
public static enum Field {
+ /** the json field for country. */
COUNTRY("country"),
+ /** the json field for extendedAddress. */
EXTENDED_ADDRESS("extendedAddress"),
+ /** the json field for latitude. */
LATITUDE("latitude"),
+ /** the json field for locality. */
LOCALITY("locality"),
+ /** the json field for longitude. */
LONGITUDE("longitude"),
+ /** the json field for poBox. */
PO_BOX("poBox"),
+ /** the json field for postalCode. */
POSTAL_CODE("postalCode"),
+ /** the json field for region. */
REGION("region"),
+ /** the json field for streetAddress. */
STREET_ADDRESS("streetAddress"),
+ /** the json field for type. */
TYPE("type"),
+ /** the json field for unstructuredAddress. */
UNSTRUCTURED_ADDRESS("unstructuredAddress");
+ /**
+ * The json field that the instance represents.
+ */
private final String jsonString;
+ /**
+ * create a field base on the a json element.
+ *
+ * @param jsonString the name of the element
+ */
private Field(String jsonString) {
this.jsonString = jsonString;
}
+ /**
+ * emit the field as a json element.
+ *
+ * @return the field name
+ */
@Override
public String toString() {
return this.jsonString;
}
}
+ /**
+ * Get the country. Container support for this field is REQUIRED.
+ *
+ * @return the country
+ */
String getCountry();
+ /**
+ * Set the country. Container support for this field is REQUIRED.
+ *
+ * @param country the country
+ */
void setCountry(String country);
+ /**
+ * Get the extended street address. Container support for this field is
REQUIRED.
+ *
+ * @return the extended street address
+ */
String getExtendedAddress();
+ /**
+ * Set the extended street address. Container support for this field is
REQUIRED.
+ *
+ * @param extendedAddress the extended street address
+ */
void setExtendedAddress(String extendedAddress);
+ /**
+ * Get the latitude. Container support for this field is REQUIRED.
+ *
+ * @return latitude
+ */
Float getLatitude();
+ /**
+ * Set the latitude. Container support for this field is REQUIRED.
+ *
+ * @param latitude latitude
+ */
void setLatitude(Float latitude);
+ /**
+ * Get the locality. Container support for this field is REQUIRED.
+ *
+ * @return the locality
+ */
String getLocality();
+ /**
+ * Set the locality. Container support for this field is REQUIRED.
+ *
+ * @param locality the locality
+ */
void setLocality(String locality);
+ /**
+ * Get the longitude of the address in degrees. Container support for this
field is REQUIRED.
+ *
+ * @return the longitude of the address in degrees
+ */
Float getLongitude();
+ /**
+ * Set the longitude of the address in degrees. Container support for this
field is REQUIRED.
+ *
+ * @param longitude the longitude of the address in degrees.
+ */
void setLongitude(Float longitude);
+ /**
+ * Get the P O box. Container support for this field is REQUIRED.
+ *
+ * @return the PO box
+ */
String getPoBox();
+ /**
+ * Set the PO box. Container support for this field is REQUIRED.
+ *
+ * @param poBox the PO box
+ */
void setPoBox(String poBox);
+ /**
+ * Get the Postal code for the address. Container support for this field is
REQUIRED.
+ *
+ * @return the postal code for the address
+ */
String getPostalCode();
+ /**
+ * Set the postal code for the address. Container support for this field is
REQUIRED.
+ *
+ * @param postalCode the postal code
+ */
void setPostalCode(String postalCode);
+ /**
+ * Get the region. Container support for this field is REQUIRED.
+ *
+ * @return the region
+ */
String getRegion();
+ /**
+ * Set the region. Container support for this field is REQUIRED.
+ *
+ * @param region the region
+ */
void setRegion(String region);
+ /**
+ * Get the street address. Container support for this field is REQUIRED.
+ *
+ * @return the street address
+ */
String getStreetAddress();
+ /**
+ * Set the street address. Container support for this field is REQUIRED.
+ *
+ * @param streetAddress the street address
+ */
void setStreetAddress(String streetAddress);
+ /**
+ * Get the type of label of the address. Container support for this field is
REQUIRED.
+ *
+ * @return the type or label of the address
+ */
String getType();
+ /**
+ * Get the type of label of the address. Container support for this field is
REQUIRED.
+ *
+ * @param type the type of label of the address.
+ */
void setType(String type);
+ /**
+ * Get the unstructured address. If the container does not have structured
addresses in its data
+ * store, this field contains the unstructured address that the user
entered, specified as a
+ * string. Container support for this field is REQUIRED.
+ *
+ * @return
+ */
String getUnstructuredAddress();
+ /**
+ * Set the unstructured address. If the container does not have structured
addresses in its data
+ * store, this field contains the unstructured address that the user
entered, specified as a
+ * string. Container support for this field is REQUIRED.
+ *
+ * @param unstructuredAddress the unstructured address
+ */
void setUnstructuredAddress(String unstructuredAddress);
}
Modified:
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=679376&r1=679375&r2=679376&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/BodyType.java
Thu Jul 24 04:54:24 2008
@@ -21,46 +21,131 @@
import com.google.inject.ImplementedBy;
+/**
+ * Base interface for all body type objects. see
+ *
http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.BodyType.Field_field_detail
+ *
+ */
@ImplementedBy(BodyTypeImpl.class)
-
public interface BodyType {
+ /**
+ * The fields that represent the person object ion json form.
+ */
public static enum Field {
+ /** the json field for build. */
BUILD("build"),
+ /** the json field for build. */
EYE_COLOR("eyeColor"),
+ /** the json field for hairColor. */
HAIR_COLOR("hairColor"),
+ /** the json field for height. */
HEIGHT("height"),
+ /** the json field for weight. */
WEIGHT("weight");
+ /**
+ * The json field that the instance represents.
+ */
private final String jsonString;
+ /**
+ * create a field base on the a json element.
+ *
+ * @param jsonString the name of the element
+ */
private Field(String jsonString) {
this.jsonString = jsonString;
}
+ /**
+ * emit the field as a json element.
+ *
+ * @return the field name
+ */
@Override
public String toString() {
return this.jsonString;
}
}
+ /**
+ * The build of the person's body, specified as a string. Container support
for this field is
+ * OPTIONAL.
+ *
+ * @return the build of the person's body
+ */
String getBuild();
+ /**
+ * The build of the person's body, specified as a string. Container support
for this field is
+ * OPTIONAL.
+ *
+ * @param build the build of the person's body
+ */
void setBuild(String build);
+ /**
+ * The eye color of the person, specified as a string. Container support for
this field is
+ * OPTIONAL.
+ *
+ * @return the eye color of the person
+ */
String getEyeColor();
+ /**
+ * The eye color of the person, specified as a string. Container support for
this field is
+ * OPTIONAL.
+ *
+ * @param eyeColor the eye color of the person
+ */
void setEyeColor(String eyeColor);
+ /**
+ * The hair color of the person, specified as a string. Container support
for this field is
+ * OPTIONAL.
+ *
+ * @return the hair color of the person
+ */
String getHairColor();
+ /**
+ * The hair color of the person, specified as a string. Container support
for this field is
+ * OPTIONAL.
+ *
+ * @param hairColor the hair color of the person
+ */
void setHairColor(String hairColor);
+ /**
+ * The height of the person in meters, specified as a number. Container
support for this field is
+ * OPTIONAL.
+ *
+ * @return the height of the person in meters
+ */
String getHeight();
+ /**
+ * The height of the person in meters, specified as a number. Container
support for this field is
+ * OPTIONAL.
+ *
+ * @param height the height of the person in meters
+ */
void setHeight(String height);
+ /**
+ * The weight of the person in kilograms, specified as a number. Container
support for this field
+ * is OPTIONAL.
+ *
+ * @return the weight of the person in kilograms
+ */
String getWeight();
+ /**
+ * The weight of the person in kilograms, specified as a number. Container
support for this field
+ * is OPTIONAL.
+ *
+ * @param weight weight of the person in kilograms
+ */
void setWeight(String weight);
}
Modified:
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=679376&r1=679375&r2=679376&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/Email.java
Thu Jul 24 04:54:24 2008
@@ -22,36 +22,74 @@
import com.google.inject.ImplementedBy;
/**
- * see
- *
http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Email.Field.html
+ * see
http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Email.Field.html
*
*/
@ImplementedBy(EmailImpl.class)
-
public interface Email {
+ /**
+ * The fields that represent the email object ion json form.
+ */
public static enum Field {
+ /** the json field for address. */
ADDRESS("address"),
+ /** the json field for type. */
TYPE("type");
+ /**
+ * The json field that the instance represents.
+ */
private final String jsonString;
+ /**
+ * create a field base on the a json element.
+ *
+ * @param jsonString the name of the element
+ */
private Field(String jsonString) {
this.jsonString = jsonString;
}
+ /**
+ * emit the field as a json element.
+ *
+ * @return the field name
+ */
@Override
public String toString() {
return this.jsonString;
}
}
+ /**
+ * The email address, specified as a string.
+ *
+ * @return email address
+ */
String getAddress();
+ /**
+ * The email address, specified as a string.
+ *
+ * @param address email address
+ */
void setAddress(String address);
+ /**
+ * The email type or label, specified as a string. Examples: work, my
favorite store, my house,
+ * etc.
+ *
+ * @return email type or label
+ */
String getType();
+ /**
+ * The email type or label, specified as a string. Examples: work, my
favorite store, my house,
+ * etc.
+ *
+ * @param type email type or label
+ */
void setType(String type);
}
Modified:
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=679376&r1=679375&r2=679376&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/Person.java
Thu Jul 24 04:54:24 2008
@@ -1044,21 +1044,24 @@
void setUrls(List<Url> urls);
/**
- * @return true if the person accessing this object is the owner.
+ * @return true if this person object represents the owner of the current
page.
*/
boolean getIsOwner();
/**
+ * Set the owner flag.
* @param isOwner the isOwnerflag
*/
void setIsOwner(boolean isOwner);
/**
+ * Returns true if this person object represents the currently logged in
user.
* @return true if the person accessing this object is a viewer.
*/
boolean getIsViewer();
/**
+ * Returns true if this person object represents the currently logged in
user.
* @param isViewer the isViewer Flag
*/
void setIsViewer(boolean isViewer);