Spring Social Yammer

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

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

public class GroupTemplate
extends AbstractYammerOperations
implements GroupOperations

Author:
Morten Andersen-Gott

Field Summary
 
Fields inherited from interface org.springframework.social.yammer.api.GroupOperations
SORT_BY_CREATED_AT, SORT_BY_CREATOR, SORT_BY_MEMBERS, SORT_BY_MESSAGES, SORT_BY_PRIVACY
 
Constructor Summary
GroupTemplate(org.springframework.web.client.RestTemplate restTemplate)
           
 
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
 void updateGroup(long groupId, java.lang.String name, boolean isPrivate)
          Method returns 401 from Yammer, so it isn't visible in GroupOperations yet
 
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

GroupTemplate

public GroupTemplate(org.springframework.web.client.RestTemplate restTemplate)
Method Detail

getGroups

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

Specified by:
getGroups in interface GroupOperations
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

public Group getGroup(long groupId)
Description copied from interface: GroupOperations
Returns the group with the given id

Specified by:
getGroup in interface GroupOperations
Returns:
Group for given id

createGroup

public void createGroup(java.lang.String name,
                        boolean isPrivate)
Description copied from interface: GroupOperations
Create a new group

Specified by:
createGroup in interface GroupOperations
Parameters:
name - of group
isPrivate - whether the group is public (anyone can join) or private

updateGroup

public void updateGroup(long groupId,
                        java.lang.String name,
                        boolean isPrivate)
Method returns 401 from Yammer, so it isn't visible in GroupOperations yet

Parameters:
groupId -
name -
isPrivate -

joinGroup

public void joinGroup(long groupId)
Description copied from interface: GroupOperations
Join a group with given group id

Specified by:
joinGroup in interface GroupOperations

leaveGroup

public void leaveGroup(long groupId)
Description copied from interface: GroupOperations
Join group with given group id

Specified by:
leaveGroup in interface GroupOperations

Spring Social Yammer