nl.surfnet.coin.teams.service
Interface GrouperTeamService

All Superinterfaces:
GrouperDao
All Known Implementing Classes:
GrouperTeamServiceWsImpl, InMemoryMockTeamService

public interface GrouperTeamService
extends GrouperDao

Main interface for dealing with Teams


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 personId)
          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
 Member findMember(String teamId, String memberId)
          Tries to find a Member in a Team
 Stem findStem(String stemId)
           
 Team findTeamById(String teamId)
          Find Team by id
 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 interface nl.surfnet.coin.teams.service.GrouperDao
findAllTeams, findAllTeamsByMember, findStemsByMember, findTeams, findTeamsByMember
 

Method Detail

findTeamById

Team findTeamById(String teamId)
Find Team by id

Parameters:
teamId - unique identifier for a Team
Returns:
Team with all members

addTeam

String addTeam(String teamId,
               String displayName,
               String teamDescription,
               String stemName)
               throws DuplicateTeamException
Add a Team. Note that the teamId is altered if not compliant to the rules for correct id's.

Parameters:
teamId - the teamId
displayName - the displayName
teamDescription - description of the team
stemName - name of the stem
Returns:
The id of the team
Throws:
DuplicateTeamException - when a team with with the given teamId already exists.

updateTeam

void updateTeam(String teamId,
                String displayName,
                String teamDescription,
                String actAsSubject)
Update a Team

Parameters:
teamId - the id of a Team
displayName - the new displayName
teamDescription - the new description of the Team
actAsSubject - the unique identifier that performs the request in Grouper. Can be the power user or the memberId

deleteTeam

void deleteTeam(String teamId)
Delete a Team

Parameters:
teamId - the unique identifier

deleteMember

void deleteMember(String teamId,
                  String personId)
Delete a Member from a Team

Parameters:
teamId - the unique identifier for a Team
personId - the unique identifier for a Member

setVisibilityGroup

void setVisibilityGroup(String teamId,
                        boolean viewable)
Update the Team to be (not) visible

Parameters:
teamId - unique identifier for a Team
viewable - boolean

addMemberRole

boolean addMemberRole(String teamId,
                      String memberId,
                      Role role,
                      String actAsUserId)
Add Role to a Team

Parameters:
teamId - the unique identifier of a Team
memberId - the unique identifier of a Member
role - the Role to be added
actAsUserId - the unique identifier that performs the request in Grouper. Can be the power user or the memberId
Returns:
boolean true if the Role has been successfully added false if the Role has not been added

removeMemberRole

boolean removeMemberRole(String teamId,
                         String memberId,
                         Role role,
                         String actAsUserId)
Remove Role to a Team

Parameters:
teamId - the unique identifier of a Team
memberId - the unique identifier of a Member
role - the Role to be removed
actAsUserId - the unique identifier that performs the request in Grouper. Can be the power user of the memberId
Returns:
boolean true if the Role has been successfully added false if the Role has not been added

addMember

void addMember(String teamId,
               nl.surfnet.coin.api.client.domain.Person person)
Adds a person to the team

Parameters:
teamId - the unique identifier of the Team
person - Person to add as Member to the Team

findMember

Member findMember(String teamId,
                  String memberId)
Tries to find a Member in a Team

Parameters:
teamId - the unique identifier of the Team
memberId - the unique identifier of a Member
Returns:
Member or null if the Team does not contain a Member by the memberId

findAdmins

Set<Member> findAdmins(Team team)
Returns a Set of Member's that have the admin role for this team

Parameters:
team - Team
Returns:
Set of Member's with admin role, can be empty

doesStemExists

boolean doesStemExists(String stemName)
Does the Stem exists?

Parameters:
stemName - the exact name of the stem
Returns:
true if the Stem is an existing Stem

findStem

Stem findStem(String stemId)


Copyright © 2009-2013 SURFnet bv, The Netherlands. All Rights Reserved.