public class GrouperTeamServiceWsImpl extends Object implements GrouperTeamService
GrouperTeamService using Grouper LDAP as persistent store| Constructor and Description |
|---|
GrouperTeamServiceWsImpl() |
| 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 personId)
Delete a Member from a
Team |
void |
deleteTeam(String teamId)
Delete a
Team |
Set<Member> |
findAdmins(Team team)
Returns a Set of
Member's that have the admin role for this 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
|
TeamResultWrapper |
findPublicTeams(String personId,
String partOfGroupname)
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
|
Stem |
findStem(String stemId) |
List<Stem> |
findStemsByMember(String personId)
Return all stems for a person
|
Team |
findTeamById(String teamId)
Find
Team by id |
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
|
String |
getGrouperPowerUser() |
int |
pagenumber(int offset,
int pageSize)
Get a page number by the given offset and pageSize.
|
boolean |
removeMemberRole(String teamId,
String memberId,
Role role,
String actAsUserId)
|
void |
setEnvironment(TeamEnvironment environment) |
void |
setVisibilityGroup(String teamId,
boolean viewable)
Update the
Team to be (not) visible |
protected String |
teamIdWithContext(String teamId)
Prepend the teamId with the (environment specific) context.
|
void |
updateTeam(String teamId,
String displayName,
String teamDescription,
String actAsSubject)
Update a
Team |
public Team findTeamById(String teamId)
Team by idfindTeamById in interface GrouperTeamServiceteamId - unique identifier for a Teampublic Stem findStem(String stemId)
findStem in interface GrouperTeamServicepublic 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 personId)
TeamdeleteMember in interface GrouperTeamServiceteamId - the unique identifier for a TeampersonId - the unique identifier for a Memberpublic void deleteTeam(String teamId)
TeamdeleteTeam in interface GrouperTeamServiceteamId - the unique identifierpublic 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 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 Member findMember(String teamId, String memberId)
findMember 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 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 void setEnvironment(TeamEnvironment environment)
environment - the environment to setpublic TeamResultWrapper findPublicTeams(String personId, String partOfGroupname)
GrouperTeamServicefindPublicTeams in interface GrouperTeamServicepersonId - the logged in personpartOfGroupname - part of group namepublic TeamResultWrapper findAllTeamsByMember(String personId, int offset, int pageSize)
GrouperTeamServicefindAllTeamsByMember in interface GrouperTeamServicepersonId - the logged in personoffset - the row number of the startpageSize - the maximum result sizepublic int pagenumber(int offset,
int pageSize)
public TeamResultWrapper findTeamsByMember(String personId, String partOfGroupname, int offset, int pageSize)
GrouperTeamServicefindTeamsByMember in interface GrouperTeamServicepersonId - the logged in personpartOfGroupname - part of group nameoffset - the row number of the startpageSize - the maximum result sizepublic List<Stem> findStemsByMember(String personId)
GrouperTeamServicefindStemsByMember in interface GrouperTeamServicepersonId - String the identifier of the logged in personList the list with stems that this user is a member of.public String getGrouperPowerUser()
protected String teamIdWithContext(String teamId)
teamId - the teamId without context (e.g.: nl:surfnet:diensten:mygroup)Copyright © 2009–2014 SURFnet bv, The Netherlands. All rights reserved.