|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.surfnet.coin.teams.service.impl.InMemoryMockTeamService
public class InMemoryMockTeamService
Mock implementation of GrouperTeamService
| Constructor Summary | |
|---|---|
InMemoryMockTeamService()
Constructor |
|
| Method Summary | |
|---|---|
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)
Add Role to a Team |
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)
Remove Role to a Team |
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InMemoryMockTeamService()
| Method Detail |
|---|
public Member findMember(String teamId,
String memberId)
GrouperTeamService
findMember in interface GrouperTeamServiceteamId - the unique identifier of the TeammemberId - the unique identifier of a Member
Member or null if the Team does not contain a
Member by the memberId
public 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 stem
DuplicateTeamException - when a team with with the given teamId already exists.
public void deleteMember(String teamId,
String memberId)
Team
deleteMember in interface GrouperTeamServiceteamId - the unique identifier for a TeammemberId - the unique identifier for a Memberpublic void deleteTeam(String teamId)
Team
deleteTeam in interface GrouperTeamServiceteamId - the unique identifier
public 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 size
public TeamResultWrapper findTeams(String personId,
String partOfGroupname,
int offset,
int pageSize)
GrouperDao
findTeams in interface GrouperDaopersonId - the logged in personpartOfGroupname - part of group nameoffset - the row number of the startpageSize - the maximum result size
public TeamResultWrapper findAllTeamsByMember(String personId,
int offset,
int pageSize)
GrouperDao
findAllTeamsByMember in interface GrouperDaopersonId - the logged in personoffset - the row number of the startpageSize - the maximum result size
public TeamResultWrapper findTeamsByMember(String personId,
String partOfGroupname,
int offset,
int pageSize)
GrouperDao
findTeamsByMember in interface GrouperDaopersonId - the logged in personpartOfGroupname - part of group nameoffset - the row number of the startpageSize - the maximum result size
public List<Stem> findStemsByMember(String personId)
findStemsByMember in interface GrouperDaopersonId - String the identifier of the logged in person
List the list with stems that this user is a member of.public Team findTeamById(String teamId)
Team by id
findTeamById in interface GrouperTeamServiceteamId - unique identifier for a Team
public void setVisibilityGroup(String teamId,
boolean viewable)
Team to be (not) visible
setVisibilityGroup in interface GrouperTeamServiceteamId - unique identifier for a Teamviewable - boolean
public boolean addMemberRole(String teamId,
String memberId,
Role role,
String actAsUserId)
Role to a Team
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 memberId
Role has been successfully added false
if the Role has not been added
public boolean removeMemberRole(String teamId,
String memberId,
Role role,
String actAsUserId)
Role to a Team
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 memberId
Role has been successfully added false
if the Role has not been added
public 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 Team
public void updateTeam(String teamId,
String displayName,
String teamDescription,
String actAsSubject)
Team
updateTeam 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 team
findAdmins in interface GrouperTeamServiceteam - Team
Member's with admin role, can be emptypublic boolean doesStemExists(String stemName)
GrouperTeamService
doesStemExists in interface GrouperTeamServicestemName - the exact name of the stem
public Stem findStem(String stemId)
findStem in interface GrouperTeamService
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||