public class InMemoryMockTeamService extends Object implements GrouperTeamService
GrouperTeamService| Constructor and Description |
|---|
InMemoryMockTeamService()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMember(String teamId,
nl.surfnet.coin.api.client.domain.Person person)
Adds a person to the team
|
boolean |
addMemberRole(String teamId,
String memberId,
Role role,
String actAsUserId)
|
String |
addTeam(String teamId,
String displayName,
String teamDescription,
String stemName)
Add a
Team. |
void |
deleteMember(String teamId,
String memberId)
Delete a Member from a
Team |
void |
deleteTeam(String teamId)
Delete a
Team |
boolean |
doesStemExists(String stemName)
Does the Stem exists?
|
Set<Member> |
findAdmins(Team team)
Returns a Set of
Member's that have the admin role for this team |
TeamResultWrapper |
findAllTeams(String personId,
int offset,
int pageSize)
Return all teams using a specific stem, without the teams being private
except if the personId is a member of the private team
|
TeamResultWrapper |
findAllTeamsByMember(String personId,
int offset,
int pageSize)
Return all teams using a specific stem where the personId is a member
|
Member |
findMember(String teamId,
String memberId)
Tries to find a Member in a Team
|
Stem |
findStem(String stemId) |
List<Stem> |
findStemsByMember(String personId)
Return all stems for a person
|
Team |
findTeamById(String teamId)
Find
Team by id |
TeamResultWrapper |
findTeams(String personId,
String partOfGroupname,
int offset,
int pageSize)
Return all teams using a specific stem with a name like, , without the
teams being private except if the personId is a member of the private team
|
TeamResultWrapper |
findTeamsByMember(String personId,
String partOfGroupname,
int offset,
int pageSize)
Return all teams using a specific stem with a name like where the personId is a member
|
boolean |
removeMemberRole(String teamId,
String memberId,
Role role,
String actAsUserId)
|
void |
setVisibilityGroup(String teamId,
boolean viewable)
Update the
Team to be (not) visible |
void |
updateTeam(String teamId,
String displayName,
String teamDescription,
String actAsSubject)
Update a
Team |
public Member findMember(String teamId, String memberId)
GrouperTeamServicefindMember in interface GrouperTeamServiceteamId - the unique identifier of the TeammemberId - the unique identifier of a MemberMember or null if the Team does not contain a
Member by the memberIdpublic String addTeam(String teamId, String displayName, String teamDescription, String stemName) throws DuplicateTeamException
Team. Note that the teamId is altered if not compliant to the
rules for correct id's.addTeam in interface GrouperTeamServiceteamId - the teamIddisplayName - the displayNameteamDescription - description of the teamstemName - name of the stemDuplicateTeamException - when a team with with the given teamId already exists.public void deleteMember(String teamId, String memberId)
TeamdeleteMember in interface GrouperTeamServiceteamId - the unique identifier for a TeammemberId - the unique identifier for a Memberpublic void deleteTeam(String teamId)
TeamdeleteTeam in interface GrouperTeamServiceteamId - the unique identifierpublic TeamResultWrapper findAllTeams(String personId, int offset, int pageSize)
findAllTeams in interface GrouperDaopersonId - the logged in personoffset - the row number of the startpageSize - the maximum result sizepublic TeamResultWrapper findTeams(String personId, String partOfGroupname, int offset, int pageSize)
GrouperDaofindTeams in interface GrouperDaopersonId - the logged in personpartOfGroupname - part of group nameoffset - the row number of the startpageSize - the maximum result sizepublic TeamResultWrapper findAllTeamsByMember(String personId, int offset, int pageSize)
GrouperDaofindAllTeamsByMember in interface GrouperDaopersonId - the logged in personoffset - the row number of the startpageSize - the maximum result sizepublic TeamResultWrapper findTeamsByMember(String personId, String partOfGroupname, int offset, int pageSize)
GrouperDaofindTeamsByMember in interface GrouperDaopersonId - the logged in personpartOfGroupname - part of group nameoffset - the row number of the startpageSize - the maximum result sizepublic List<Stem> findStemsByMember(String personId)
findStemsByMember in interface GrouperDaopersonId - String the identifier of the logged in personList the list with stems that this user is a member of.public Team findTeamById(String teamId)
Team by idfindTeamById in interface GrouperTeamServiceteamId - unique identifier for a Teampublic void setVisibilityGroup(String teamId, boolean viewable)
Team to be (not) visiblesetVisibilityGroup in interface GrouperTeamServiceteamId - unique identifier for a Teamviewable - booleanpublic boolean addMemberRole(String teamId, String memberId, Role role, String actAsUserId)
addMemberRole in interface GrouperTeamServiceteamId - the unique identifier of a TeammemberId - the unique identifier of a Memberrole - the Role to be addedactAsUserId - the unique identifier that performs the request in Grouper. Can be the power user
or the memberIdRole has been successfully added false
if the Role has not been addedpublic boolean removeMemberRole(String teamId, String memberId, Role role, String actAsUserId)
removeMemberRole in interface GrouperTeamServiceteamId - the unique identifier of a TeammemberId - the unique identifier of a Memberrole - the Role to be removedactAsUserId - the unique identifier that performs the request in Grouper. Can be the power user
of the memberIdRole has been successfully added false
if the Role has not been addedpublic void addMember(String teamId, nl.surfnet.coin.api.client.domain.Person person)
addMember in interface GrouperTeamServiceteamId - the unique identifier of the
Teamperson - Person to add as Member to the Teampublic void updateTeam(String teamId, String displayName, String teamDescription, String actAsSubject)
TeamupdateTeam in interface GrouperTeamServiceteamId - the id of a TeamdisplayName - the new displayNameteamDescription - the new description of the TeamactAsSubject - the unique identifier that performs the request in Grouper. Can be the power user
or the memberIdpublic Set<Member> findAdmins(Team team)
Member's that have the admin role for this teamfindAdmins in interface GrouperTeamServiceteam - TeamMember's with admin role, can be emptypublic boolean doesStemExists(String stemName)
GrouperTeamServicedoesStemExists in interface GrouperTeamServicestemName - the exact name of the stempublic Stem findStem(String stemId)
findStem in interface GrouperTeamServiceCopyright © 2009-2013 SURFnet bv, The Netherlands. All Rights Reserved.