org.squashtest.tm.service.internal.campaign
Class CampaignTestPlanManagerServiceImpl

java.lang.Object
  extended by org.squashtest.tm.service.internal.campaign.CampaignTestPlanManagerServiceImpl
All Implemented Interfaces:
CampaignTestPlanManagerService

@Service(value="squashtest.tm.service.CampaignTestPlanManagerService")
@Transactional
public class CampaignTestPlanManagerServiceImpl
extends Object
implements CampaignTestPlanManagerService


Constructor Summary
CampaignTestPlanManagerServiceImpl()
           
 
Method Summary
 void addTestCasesToCampaignTestPlan(List<Long> testCasesIds, long campaignId)
          Adds a list of test cases to a campaign.
 void assignUserToTestPlanItem(long itemId, long campaignId, long userId)
          Assign a user to the given test plan items
 void assignUserToTestPlanItems(List<Long> itemsIds, long campaignId, long userId)
          Assign a user to the given test plan items
 List<org.squashtest.tm.domain.users.User> findAssignableUserForTestPlan(long campaignId)
          Get Users with Execute Access for a campaign and his test plans.
 org.squashtest.tm.domain.campaign.CampaignTestPlanItem findById(long itemId)
           
 org.squashtest.tm.domain.campaign.Campaign findCampaign(long campaignId)
          Find a campaign using its id
 List<org.squashtest.tm.domain.testcase.TestCaseLibrary> findLinkableTestCaseLibraries()
          Returns a collection of TestCaseLibrary, the test cases of which may be added to the campaign
 org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<IndexedCampaignTestPlanItem>> findTestPlan(long campaignId, org.squashtest.tm.core.foundation.collection.PagingAndMultiSorting sorting, org.squashtest.tm.core.foundation.collection.ColumnFiltering filtering)
           
 org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.campaign.CampaignTestPlanItem>> findTestPlanByCampaignId(long campaignId, org.squashtest.tm.core.foundation.collection.PagingAndSorting filter)
           
 void moveTestPlanItems(long campaignId, int targetIndex, List<Long> itemIds)
           
 void removeTestPlanItem(long campaignId, long itemId)
           
 void removeTestPlanItems(long campaignId, List<Long> itemIds)
           
 void reorderTestPlan(long campaignId, org.squashtest.tm.core.foundation.collection.MultiSorting newSorting)
           
 void setObjectIdentityRetrievalStrategy(org.springframework.security.acls.model.ObjectIdentityRetrievalStrategy objectIdentityRetrievalStrategy)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CampaignTestPlanManagerServiceImpl

public CampaignTestPlanManagerServiceImpl()
Method Detail

setObjectIdentityRetrievalStrategy

public void setObjectIdentityRetrievalStrategy(org.springframework.security.acls.model.ObjectIdentityRetrievalStrategy objectIdentityRetrievalStrategy)

findCampaign

@Transactional(readOnly=true)
@PostAuthorize(value="hasPermission(returnObject, \'READ\') or hasRole(\'ROLE_ADMIN\')")
public org.squashtest.tm.domain.campaign.Campaign findCampaign(long campaignId)
Description copied from interface: CampaignTestPlanManagerService
Find a campaign using its id

Specified by:
findCampaign in interface CampaignTestPlanManagerService

findLinkableTestCaseLibraries

@Transactional(readOnly=true)
@PostFilter(value="hasPermission(filterObject, \'READ\') or hasRole(\'ROLE_ADMIN\')")
public List<org.squashtest.tm.domain.testcase.TestCaseLibrary> findLinkableTestCaseLibraries()
Description copied from interface: CampaignTestPlanManagerService
Returns a collection of TestCaseLibrary, the test cases of which may be added to the campaign

Specified by:
findLinkableTestCaseLibraries in interface CampaignTestPlanManagerService

findTestPlanByCampaignId

@PreAuthorize(value="hasPermission(#campaignId, \'org.squashtest.tm.domain.campaign.Campaign\' ,\'READ\') or hasRole(\'ROLE_ADMIN\')")
public org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.campaign.CampaignTestPlanItem>> findTestPlanByCampaignId(long campaignId,
                                                                                                                                                                              org.squashtest.tm.core.foundation.collection.PagingAndSorting filter)
Specified by:
findTestPlanByCampaignId in interface CampaignTestPlanManagerService

findTestPlan

@PreAuthorize(value="hasPermission(#campaignId, \'org.squashtest.tm.domain.campaign.Campaign\' ,\'READ\') or hasRole(\'ROLE_ADMIN\')")
public org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<IndexedCampaignTestPlanItem>> findTestPlan(long campaignId,
                                                                                                                                       org.squashtest.tm.core.foundation.collection.PagingAndMultiSorting sorting,
                                                                                                                                       org.squashtest.tm.core.foundation.collection.ColumnFiltering filtering)
Specified by:
findTestPlan in interface CampaignTestPlanManagerService

addTestCasesToCampaignTestPlan

@PreAuthorize(value="hasPermission(#campaignId, \'org.squashtest.tm.domain.campaign.Campaign\', \'LINK\') or hasRole(\'ROLE_ADMIN\')")
public void addTestCasesToCampaignTestPlan(List<Long> testCasesIds,
                                                        long campaignId)
Description copied from interface: CampaignTestPlanManagerService
Adds a list of test cases to a campaign.

Specified by:
addTestCasesToCampaignTestPlan in interface CampaignTestPlanManagerService

findAssignableUserForTestPlan

@Transactional(readOnly=true)
public List<org.squashtest.tm.domain.users.User> findAssignableUserForTestPlan(long campaignId)
Description copied from interface: CampaignTestPlanManagerService
Get Users with Execute Access for a campaign and his test plans.

Specified by:
findAssignableUserForTestPlan in interface CampaignTestPlanManagerService

assignUserToTestPlanItem

@PreAuthorize(value="hasPermission(#campaignId, \'org.squashtest.tm.domain.campaign.Campaign\', \'LINK\') or hasRole(\'ROLE_ADMIN\')")
public void assignUserToTestPlanItem(long itemId,
                                                  long campaignId,
                                                  long userId)
Description copied from interface: CampaignTestPlanManagerService
Assign a user to the given test plan items

Specified by:
assignUserToTestPlanItem in interface CampaignTestPlanManagerService
Parameters:
campaignId - not necessary but actually used for security check
userId - the assigned user
See Also:
CampaignTestPlanManagerService#assignUserToTestPlanItem(Long, long, Long)

assignUserToTestPlanItems

@PreAuthorize(value="hasPermission(#campaignId, \'org.squashtest.tm.domain.campaign.Campaign\', \'LINK\') or hasRole(\'ROLE_ADMIN\')")
public void assignUserToTestPlanItems(@NotNull
                                                   List<Long> itemsIds,
                                                   long campaignId,
                                                   long userId)
Description copied from interface: CampaignTestPlanManagerService
Assign a user to the given test plan items

Specified by:
assignUserToTestPlanItems in interface CampaignTestPlanManagerService
Parameters:
campaignId - not necessary but actually used for security check
itemsIds - the test plan items to which assign a user
userId - the assigned user
See Also:
CampaignTestPlanManagerService#assignUserToTestPlanItem(Long, long, Long)

moveTestPlanItems

@PreAuthorize(value="hasPermission(#campaignId, \'org.squashtest.tm.domain.campaign.Campaign\', \'LINK\') or hasRole(\'ROLE_ADMIN\')")
public void moveTestPlanItems(long campaignId,
                                           int targetIndex,
                                           List<Long> itemIds)
Specified by:
moveTestPlanItems in interface CampaignTestPlanManagerService
Parameters:
campaignId - the campaign which test plan we are about to modify.
targetIndex - the index of the test plan to which we want to move the items
itemIds - the ids of the items we want to move.
See Also:
CampaignTestPlanManagerService.moveTestPlanItems(long, int, java.util.List)

reorderTestPlan

@PreAuthorize(value="hasPermission(#campaignId, \'org.squashtest.tm.domain.campaign.Campaign\', \'LINK\') or hasRole(\'ROLE_ADMIN\')")
public void reorderTestPlan(long campaignId,
                                         org.squashtest.tm.core.foundation.collection.MultiSorting newSorting)
Specified by:
reorderTestPlan in interface CampaignTestPlanManagerService

removeTestPlanItem

@PreAuthorize(value="hasPermission(#campaignId, \'org.squashtest.tm.domain.campaign.Campaign\', \'LINK\') or hasRole(\'ROLE_ADMIN\')")
public void removeTestPlanItem(long campaignId,
                                            long itemId)
Specified by:
removeTestPlanItem in interface CampaignTestPlanManagerService
Parameters:
campaignId - id of the campaign which test plan we will remove an item from
itemId - id of the test plan item we want to remove
See Also:
CampaignTestPlanManagerService.removeTestPlanItem(long, long)

removeTestPlanItems

@PreAuthorize(value="hasPermission(#campaignId, \'org.squashtest.tm.domain.campaign.Campaign\', \'LINK\') or hasRole(\'ROLE_ADMIN\')")
public void removeTestPlanItems(long campaignId,
                                             List<Long> itemIds)
Specified by:
removeTestPlanItems in interface CampaignTestPlanManagerService
Parameters:
campaignId - id of the campaign which test plan we will remove items from
See Also:
CampaignTestPlanManagerService.removeTestPlanItems(long, java.util.List)

findById

@Transactional(readOnly=true)
@PostAuthorize(value="hasPermission(returnObject, \'READ\') or hasRole(\'ROLE_ADMIN\')")
public org.squashtest.tm.domain.campaign.CampaignTestPlanItem findById(long itemId)
Specified by:
findById in interface CampaignTestPlanManagerService
Returns:
See Also:
CampaignTestPlanManagerService.findById(long)


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