Spring Social Yammer

org.springframework.social.yammer.api
Interface GroupOperations

All Known Implementing Classes:
GroupTemplate

public interface GroupOperations

Sub-API for all Group related methods

Author:
Morten Andersen-Gott

Field Summary
static java.lang.String SORT_BY_CREATED_AT
          Convenience constant for sorting by created at
static java.lang.String SORT_BY_CREATOR
          Convenience constant for sorting by creator
static java.lang.String SORT_BY_MEMBERS
          Convenience constant for sorting by members
static java.lang.String SORT_BY_MESSAGES
          Convenience constant for sorting by messages
static java.lang.String SORT_BY_PRIVACY
          Convenience constant for sorting by privacy
 
Method Summary
 void createGroup(java.lang.String name, boolean isPrivate)
          Create a new group
 Group getGroup(long groupId)
          Returns the group with the given id
 java.util.List<Group> getGroups(int page, java.lang.Character letter, java.lang.String sortBy, boolean reverse)
          Retrieves a list of groups as specified by the parameters.
 void joinGroup(long groupId)
          Join a group with given group id
 void leaveGroup(long groupId)
          Join group with given group id
 

Field Detail

SORT_BY_PRIVACY

static final java.lang.String SORT_BY_PRIVACY
Convenience constant for sorting by privacy

See Also:
Constant Field Values

SORT_BY_CREATED_AT

static final java.lang.String SORT_BY_CREATED_AT
Convenience constant for sorting by created at

See Also:
Constant Field Values

SORT_BY_MESSAGES

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

See Also:
Constant Field Values

SORT_BY_CREATOR

static final java.lang.String SORT_BY_CREATOR
Convenience constant for sorting by creator

See Also:
Constant Field Values

SORT_BY_MEMBERS

static final java.lang.String SORT_BY_MEMBERS
Convenience constant for sorting by members

See Also:
Constant Field Values
Method Detail

getGroups

java.util.List<Group> getGroups(int page,
                                java.lang.Character letter,
                                java.lang.String sortBy,
                                boolean reverse)
Retrieves a list of groups as specified by the parameters. Groups are returned on pages with each page having a maximum of 20 groups.

Parameters:
page - number. First page = 1
letter - return groups beginning with the given letter
sortBy - sort key. Valid values are "creator" | "members" | "privacy" | "created_at" | "messages". Use convenience constants
reverse - indicating whether sort should be reversed
Returns:
List of Groups

getGroup

Group getGroup(long groupId)
Returns the group with the given id

Parameters:
groupId -
Returns:
Group for given id
Throws:
org.springframework.social.ResourceNotFoundException - if there is no group with the given id in the network

createGroup

void createGroup(java.lang.String name,
                 boolean isPrivate)
Create a new group

Parameters:
name - of group
isPrivate - whether the group is public (anyone can join) or private

leaveGroup

void leaveGroup(long groupId)
Join group with given group id

Parameters:
groupId -
Throws:
org.springframework.social.ResourceNotFoundException - if you are not a member of that group or group does not exist

joinGroup

void joinGroup(long groupId)
Join a group with given group id

Parameters:
groupId -
Throws:
org.springframework.social.ResourceNotFoundException - if that group does not exist in your network

Spring Social Yammer