Spring Social Yammer

org.springframework.social.yammer.api.impl
Class UserTemplate

java.lang.Object
  extended by org.springframework.social.yammer.api.impl.AbstractYammerOperations
      extended by org.springframework.social.yammer.api.impl.UserTemplate
All Implemented Interfaces:
UserOperations

public class UserTemplate
extends AbstractYammerOperations
implements UserOperations

Author:
Morten Andersen-Gott

Field Summary
 
Fields inherited from interface org.springframework.social.yammer.api.UserOperations
SORT_BY_FOLLOWERS, SORT_BY_MESSAGES
 
Constructor Summary
UserTemplate(org.springframework.web.client.RestTemplate restTemplate)
           
 
Method Summary
 YammerProfile getUser(long id)
          Get user with the given user id
 YammerProfile getUser(java.lang.String userId)
           
 YammerProfile getUserByEmail(java.lang.String email)
          Get user by e-mail
 YammerProfile getUserProfile()
          Get the user profile of the logged in user
 java.util.List<YammerProfile> getUsers(int page)
          List users using the yammer defaults by followers.
 java.util.List<YammerProfile> getUsers(int page, java.lang.String sortBy, boolean reverse, java.lang.Character letter)
          List users
 void updateProfile(long userId, UserInfo userInfo)
          Update user profile
 
Methods inherited from class org.springframework.social.yammer.api.impl.AbstractYammerOperations
buildUri, buildUri, buildUri
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserTemplate

public UserTemplate(org.springframework.web.client.RestTemplate restTemplate)
Parameters:
restTemplate -
Method Detail

getUsers

public java.util.List<YammerProfile> getUsers(int page)
Description copied from interface: UserOperations
List users using the yammer defaults by followers.

Specified by:
getUsers in interface UserOperations
Parameters:
page - the page number in the result set
Returns:
List of YammerProfiles matching criteria

getUsers

public java.util.List<YammerProfile> getUsers(int page,
                                              java.lang.String sortBy,
                                              boolean reverse,
                                              java.lang.Character letter)
Description copied from interface: UserOperations
List users

Specified by:
getUsers in interface UserOperations
Parameters:
page - the page number in the result set
sortBy - sorting key. Valid values are UserOperations.SORT_BY_FOLLOWERS (default) or UserOperations.SORT_BY_MESSAGES
reverse - true if you want the results in reversed order
letter - the letter you want the user to start with, or null if you don't want to filter by letter
Returns:
List of YammerProfiles matching criteria

getUser

public YammerProfile getUser(long id)
Description copied from interface: UserOperations
Get user with the given user id

Specified by:
getUser in interface UserOperations
Parameters:
id - of user
Returns:
YammerProfile

getUser

public YammerProfile getUser(java.lang.String userId)

updateProfile

public void updateProfile(long userId,
                          UserInfo userInfo)
Description copied from interface: UserOperations
Update user profile

Specified by:
updateProfile in interface UserOperations
Parameters:
userId - your user id
userInfo - your user info

getUserProfile

public YammerProfile getUserProfile()
Description copied from interface: UserOperations
Get the user profile of the logged in user

Specified by:
getUserProfile in interface UserOperations
Returns:
YammerProfile of the logged in user

getUserByEmail

public YammerProfile getUserByEmail(java.lang.String email)
Description copied from interface: UserOperations
Get user by e-mail

Specified by:
getUserByEmail in interface UserOperations
Parameters:
email - address
Returns:
YammerProfile with given e-mail or null if no user exists with that e-mail

Spring Social Yammer