org.squashtest.tm.service.internal.user
Class CustomTeamModificationServiceImpl

java.lang.Object
  extended by org.squashtest.tm.service.internal.user.CustomTeamModificationServiceImpl
All Implemented Interfaces:
CustomTeamFinderService, CustomTeamModificationService

@Service(value="CustomTeamModificationService")
@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
public class CustomTeamModificationServiceImpl
extends Object
implements CustomTeamModificationService


Constructor Summary
CustomTeamModificationServiceImpl()
           
 
Method Summary
 void addMember(long teamId, String login)
          Add one member, identified by its login
 void addMembers(long teamId, List<String> logins)
          Add one or more members, identified by their login, to a team identified by its id.
 void changeName(long teamId, String name)
          Changes the name the team of the given id.
 long countAll()
          Will count all Teams in the database.
 void deleteTeam(long teamId)
          Delete the team along with all it's acls.
 org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.users.Team>> findAllFiltered(org.squashtest.tm.core.foundation.collection.PagingAndSorting paging, org.squashtest.tm.core.foundation.collection.Filtering filtering)
           
 List<org.squashtest.tm.domain.users.User> findAllNonMemberUsers(long teamId)
           
 org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.users.User>> findAllTeamMembers(long teamId, org.squashtest.tm.core.foundation.collection.PagingAndSorting sorting, org.squashtest.tm.core.foundation.collection.Filtering filtering)
           
 void persist(org.squashtest.tm.domain.users.Team team)
          Check if name is available and persist the new Team.
 void removeMember(long teamId, long memberId)
           
 void removeMemberFromAllTeams(long memberId)
           
 void removeMembers(long teamId, List<Long> memberIds)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomTeamModificationServiceImpl

public CustomTeamModificationServiceImpl()
Method Detail

persist

public void persist(org.squashtest.tm.domain.users.Team team)
Description copied from interface: CustomTeamModificationService
Check if name is available and persist the new Team.

Specified by:
persist in interface CustomTeamModificationService
See Also:
CustomTeamModificationService.persist(Team)

deleteTeam

public void deleteTeam(long teamId)
Description copied from interface: CustomTeamModificationService
Delete the team along with all it's acls. Do not delete it's associated users.

Specified by:
deleteTeam in interface CustomTeamModificationService
See Also:
CustomTeamModificationService.deleteTeam(long)

findAllFiltered

public org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.users.Team>> findAllFiltered(org.squashtest.tm.core.foundation.collection.PagingAndSorting paging,
                                                                                                                                     org.squashtest.tm.core.foundation.collection.Filtering filtering)
Specified by:
findAllFiltered in interface CustomTeamFinderService

changeName

public void changeName(long teamId,
                       String name)
Description copied from interface: CustomTeamModificationService
Changes the name the team of the given id.

Specified by:
changeName in interface CustomTeamModificationService

addMember

public void addMember(long teamId,
                      String login)
Description copied from interface: CustomTeamModificationService
Add one member, identified by its login

Specified by:
addMember in interface CustomTeamModificationService

addMembers

public void addMembers(long teamId,
                       List<String> logins)
Description copied from interface: CustomTeamModificationService
Add one or more members, identified by their login, to a team identified by its id.

Specified by:
addMembers in interface CustomTeamModificationService

findAllNonMemberUsers

public List<org.squashtest.tm.domain.users.User> findAllNonMemberUsers(long teamId)
Specified by:
findAllNonMemberUsers in interface CustomTeamFinderService

removeMember

public void removeMember(long teamId,
                         long memberId)
Specified by:
removeMember in interface CustomTeamModificationService

removeMembers

public void removeMembers(long teamId,
                          List<Long> memberIds)
Specified by:
removeMembers in interface CustomTeamModificationService

findAllTeamMembers

public org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.users.User>> findAllTeamMembers(long teamId,
                                                                                                                                        org.squashtest.tm.core.foundation.collection.PagingAndSorting sorting,
                                                                                                                                        org.squashtest.tm.core.foundation.collection.Filtering filtering)
Specified by:
findAllTeamMembers in interface CustomTeamFinderService

removeMemberFromAllTeams

public void removeMemberFromAllTeams(long memberId)
Specified by:
removeMemberFromAllTeams in interface CustomTeamModificationService

countAll

public long countAll()
Description copied from interface: CustomTeamFinderService
Will count all Teams in the database. (could not manage to make this a dynamic method)

Specified by:
countAll in interface CustomTeamFinderService
Returns:
the total number of teams in the database.
See Also:
CustomTeamFinderService#countAll()


Copyright © 2010-2013 Henix, henix.fr. All Rights Reserved.