org.squashtest.tm.service.internal.execution
Class ExecutionModificationServiceImpl

java.lang.Object
  extended by org.squashtest.tm.service.internal.execution.ExecutionModificationServiceImpl
All Implemented Interfaces:
ExecutionFinder, ExecutionModificationService

@Service(value="squashtest.tm.service.ExecutionModificationService")
public class ExecutionModificationServiceImpl
extends Object
implements ExecutionModificationService


Constructor Summary
ExecutionModificationServiceImpl()
           
 
Method Summary
 void deleteExecution(org.squashtest.tm.domain.execution.Execution execution)
          that method should delete the execution.
 org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.execution.Execution>> findAllByTestCaseId(long testCaseId, org.squashtest.tm.core.foundation.collection.PagingAndSorting pas)
          Fetches all the executions which ran a given test case and matching the given paging and sorting instructions.
 List<org.squashtest.tm.domain.execution.Execution> findAllByTestCaseIdOrderByRunDate(long testCaseId, org.squashtest.tm.core.foundation.collection.Paging paging)
           
 org.squashtest.tm.domain.execution.Execution findAndInitExecution(Long executionId)
           
 org.squashtest.tm.domain.execution.Execution findById(long id)
           
 int findExecutionRank(Long executionId)
           
 org.squashtest.tm.domain.execution.ExecutionStep findExecutionStepById(long id)
           
 List<org.squashtest.tm.domain.execution.ExecutionStep> findExecutionSteps(long executionId)
           
 org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.execution.ExecutionStep>> findExecutionSteps(long executionId, org.squashtest.tm.core.foundation.collection.Paging filter)
          Steps methods
 void setExecutionDescription(Long executionId, String description)
           
 void setExecutionStepComment(Long executionStepId, String comment)
           
 List<SuppressionPreviewReport> simulateExecutionDeletion(Long execId)
          that method should investigate the consequences of the deletion of the given executions, and return a report about what will happen.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionModificationServiceImpl

public ExecutionModificationServiceImpl()
Method Detail

findAndInitExecution

public org.squashtest.tm.domain.execution.Execution findAndInitExecution(Long executionId)
Specified by:
findAndInitExecution in interface ExecutionModificationService

setExecutionDescription

@PreAuthorize(value="hasPermission(#executionId, \'org.squashtest.tm.domain.execution.Execution\', \'EXECUTE\') or hasRole(\'ROLE_ADMIN\')")
public void setExecutionDescription(Long executionId,
                                                 String description)
Specified by:
setExecutionDescription in interface ExecutionModificationService

findExecutionSteps

public List<org.squashtest.tm.domain.execution.ExecutionStep> findExecutionSteps(long executionId)
Specified by:
findExecutionSteps in interface ExecutionFinder

findExecutionRank

public int findExecutionRank(Long executionId)
Specified by:
findExecutionRank in interface ExecutionFinder

setExecutionStepComment

@PreAuthorize(value="hasPermission(#executionStepId, \'org.squashtest.tm.domain.execution.ExecutionStep\', \'EXECUTE\') or hasRole(\'ROLE_ADMIN\')")
public void setExecutionStepComment(Long executionStepId,
                                                 String comment)
Specified by:
setExecutionStepComment in interface ExecutionModificationService

findExecutionSteps

public org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.execution.ExecutionStep>> findExecutionSteps(long executionId,
                                                                                                                                                     org.squashtest.tm.core.foundation.collection.Paging filter)
Description copied from interface: ExecutionModificationService
Steps methods

Specified by:
findExecutionSteps in interface ExecutionModificationService

simulateExecutionDeletion

@PreAuthorize(value="hasPermission(#execId, \'org.squashtest.tm.domain.execution.Execution\', \'EXECUTE\') or hasRole(\'ROLE_ADMIN\')")
public List<SuppressionPreviewReport> simulateExecutionDeletion(Long execId)
Description copied from interface: ExecutionModificationService
that method should investigate the consequences of the deletion of the given executions, and return a report about what will happen.

Specified by:
simulateExecutionDeletion in interface ExecutionModificationService
Returns:

deleteExecution

@PreAuthorize(value="hasPermission(#execution, \'EXECUTE\') or hasRole(\'ROLE_ADMIN\')")
public void deleteExecution(org.squashtest.tm.domain.execution.Execution execution)
Description copied from interface: ExecutionModificationService
that method should delete the execution. It still takes care of non deletable executions so the implementation should abort if the execution can't be deleted.

Specified by:
deleteExecution in interface ExecutionModificationService

findById

public org.squashtest.tm.domain.execution.Execution findById(long id)
Specified by:
findById in interface ExecutionFinder

findExecutionStepById

public org.squashtest.tm.domain.execution.ExecutionStep findExecutionStepById(long id)
Specified by:
findExecutionStepById in interface ExecutionFinder

findAllByTestCaseIdOrderByRunDate

public List<org.squashtest.tm.domain.execution.Execution> findAllByTestCaseIdOrderByRunDate(long testCaseId,
                                                                                            org.squashtest.tm.core.foundation.collection.Paging paging)
Specified by:
findAllByTestCaseIdOrderByRunDate in interface ExecutionFinder
Returns:
See Also:
org.squashtest.csp.core.infrastructure.collection.Paging)

findAllByTestCaseId

public org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.execution.Execution>> findAllByTestCaseId(long testCaseId,
                                                                                                                                                  org.squashtest.tm.core.foundation.collection.PagingAndSorting pas)
Description copied from interface: ExecutionFinder
Fetches all the executions which ran a given test case and matching the given paging and sorting instructions.

Specified by:
findAllByTestCaseId in interface ExecutionFinder
pas - Paging and sorting data, should not be null
Returns:
a PagedCollectionHolder holding the results. Should never return null


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