com.google.gwt.gadgets.client.osapi.people
Class PeopleService

java.lang.Object
  extended by com.google.gwt.gadgets.client.osapi.people.PeopleService

public class PeopleService
extends java.lang.Object

A class representing a service object, which maps to opensocial People Service.

See Also:
"http://opensocial-resources.googlecode.com/svn/spec/1.0/Social-API-Server.xml#People-Service"

Method Summary
static PeopleService getInstance()
          Returns an instance of PeopleService.
 GetPeopleRequestBuilder newGetGroupByIdRequestBuilder(java.lang.String userId, java.lang.String groupId)
          Returns an instance of GetPeopleRequestBuilder requesting specific group of the specific user.
 GetPersonRequestBuilder newGetOwnerRequestBuilder()
          Returns an instance of GetPersonRequestBuilder requesting an owner of the gadget.
 GetPeopleRequestBuilder newGetOwnersAllRequestBuilder()
          Returns an instance of GetPeopleRequestBuilder requesting all contacts of the owner of the gadget.
 GetPeopleRequestBuilder newGetOwnersFriendsRequestBuilder()
          Returns an instance of GetPeopleRequestBuilder requesting friends of the owner of the gadget.
 GetPersonRequestBuilder newGetPersonByIdRequestBuilder(java.lang.String userId)
          Returns an instance of GetPersonRequestBuilder requesting a person with given id.
 GetPersonRequestBuilder newGetViewerRequestBuilder()
          Returns an instance of GetPersonRequestBuilder requesting a viewer of the gadget.
 GetPeopleRequestBuilder newGetViewersAllRequestBuilder()
          Returns an instance of GetPeopleRequestBuilder requesting all contacts of the viewer of the gadget.
 GetPeopleRequestBuilder newGetViewersFriendsRequestBuilder()
          Returns an instance of GetPeopleRequestBuilder requesting friends of the viewer of the gadget.
 void setDefaultFields(java.lang.String... fields)
          Convenience method to define a default set of fields to request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static PeopleService getInstance()
Returns an instance of PeopleService. Note that this class is a singleton and all instances returned by this method are identical.

Returns:
An instance of PeopleService.

newGetGroupByIdRequestBuilder

public GetPeopleRequestBuilder newGetGroupByIdRequestBuilder(java.lang.String userId,
                                                             java.lang.String groupId)
Returns an instance of GetPeopleRequestBuilder requesting specific group of the specific user.

Returns:
An instance of GetPeopleRequestBuilder requesting specific group of the specific user.

newGetOwnerRequestBuilder

public GetPersonRequestBuilder newGetOwnerRequestBuilder()
Returns an instance of GetPersonRequestBuilder requesting an owner of the gadget.

Returns:
An instance of GetPersonRequestBuilder requesting an owner of the gadget.

newGetOwnersAllRequestBuilder

public GetPeopleRequestBuilder newGetOwnersAllRequestBuilder()
Returns an instance of GetPeopleRequestBuilder requesting all contacts of the owner of the gadget.

Returns:
An instance of GetPersonRequestBuilder requesting all contacts of the owner of the gadget.

newGetOwnersFriendsRequestBuilder

public GetPeopleRequestBuilder newGetOwnersFriendsRequestBuilder()
Returns an instance of GetPeopleRequestBuilder requesting friends of the owner of the gadget.

Returns:
An instance of GetPersonRequestBuilder requesting friends of the owner of the gadget.

newGetPersonByIdRequestBuilder

public GetPersonRequestBuilder newGetPersonByIdRequestBuilder(java.lang.String userId)
Returns an instance of GetPersonRequestBuilder requesting a person with given id.

Parameters:
userId -
Returns:
An instance of GetPersonRequestBuilder requesting a person with given id.

newGetViewerRequestBuilder

public GetPersonRequestBuilder newGetViewerRequestBuilder()
Returns an instance of GetPersonRequestBuilder requesting a viewer of the gadget.

Returns:
An instance of GetPersonRequestBuilder requesting a viewer of the gadget.

newGetViewersAllRequestBuilder

public GetPeopleRequestBuilder newGetViewersAllRequestBuilder()
Returns an instance of GetPeopleRequestBuilder requesting all contacts of the viewer of the gadget.

Returns:
An instance of GetPersonRequestBuilder requesting all contacts of the viewer of the gadget.

newGetViewersFriendsRequestBuilder

public GetPeopleRequestBuilder newGetViewersFriendsRequestBuilder()
Returns an instance of GetPeopleRequestBuilder requesting friends of the viewer of the gadget.

Returns:
An instance of GetPersonRequestBuilder requesting friends of the viewer of the gadget.

setDefaultFields

public void setDefaultFields(java.lang.String... fields)
Convenience method to define a default set of fields to request. Invocations of this method does not affect requests created with parameters which explicitly define fields to request.

Parameters:
fields - Default set of fields to request.