Spring Social Yammer

org.springframework.social.yammer.api
Interface UserOperations

All Known Implementing Classes:
UserTemplate

public interface UserOperations

Sub-API for User related operations

Author:
Morten Andersen-Gott

Field Summary
static java.lang.String SORT_BY_FOLLOWERS
          Convenience constant for sorting by followers
static java.lang.String SORT_BY_MESSAGES
          Convenience constant for sorting by messages
 
Method Summary
 YammerProfile getUser(long id)
          Get user with the given user id
 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
 

Field Detail

SORT_BY_MESSAGES

static final java.lang.String SORT_BY_MESSAGES
Convenience constant for sorting by messages

See Also:
Constant Field Values

SORT_BY_FOLLOWERS

static final java.lang.String SORT_BY_FOLLOWERS
Convenience constant for sorting by followers

See Also:
Constant Field Values
Method Detail

getUserProfile

YammerProfile getUserProfile()
Get the user profile of the logged in user

Returns:
YammerProfile of the logged in user

getUser

YammerProfile getUser(long id)
Get user with the given user id

Parameters:
id - of user
Returns:
YammerProfile
Throws:
org.springframework.social.ResourceNotFoundException - if no user corresponds to that Id in your network

getUserByEmail

YammerProfile getUserByEmail(java.lang.String email)
Get user by e-mail

Parameters:
email - address
Returns:
YammerProfile with given e-mail or null if no user exists with that e-mail

getUsers

java.util.List<YammerProfile> getUsers(int page,
                                       java.lang.String sortBy,
                                       boolean reverse,
                                       java.lang.Character letter)
List users

Parameters:
page - the page number in the result set
sortBy - sorting key. Valid values are SORT_BY_FOLLOWERS (default) or 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

getUsers

java.util.List<YammerProfile> getUsers(int page)
List users using the yammer defaults by followers.

Parameters:
page - the page number in the result set
Returns:
List of YammerProfiles matching criteria

updateProfile

void updateProfile(long userId,
                   UserInfo userInfo)
Update user profile

Parameters:
userId - your user id
userInfo - your user info

Spring Social Yammer