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

java.lang.Object
  extended by org.squashtest.tm.service.internal.execution.ExecutionProcessingServiceImpl
All Implemented Interfaces:
ExecutionProcessingService

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


Constructor Summary
ExecutionProcessingServiceImpl()
           
 
Method Summary
 void changeExecutionStepStatus(Long executionStepId, org.squashtest.tm.domain.execution.ExecutionStatus status)
          Method which modify the execution step status
It implies :
* execution status update
* item test plan status update
* last execution date and user update for step, execution and item test plan
 org.squashtest.tm.domain.execution.Execution findExecution(Long executionId)
           
 org.squashtest.tm.domain.execution.ExecutionStep findExecutionStep(Long executionStepId)
           
 int findExecutionStepRank(Long executionStepId)
           
 org.squashtest.tm.domain.execution.ExecutionStep findRunnableExecutionStep(long executionId)
           
 org.squashtest.tm.domain.execution.ExecutionStep findStepAt(long executionId, int executionStepIndex)
          Returns, for a given execution and for a given step index, the corresponding ExecutionStep Will create the next step if the index corresponds to the one immediately following the last step, similarly to "nextExecutionStep"
 int findTotalNumberSteps(Long executionId)
           
 org.squashtest.tm.domain.execution.ExecutionStatusReport getExecutionStatusReport(Long executionId)
           
 List<org.squashtest.tm.domain.execution.ExecutionStep> getExecutionSteps(Long executionId)
           
 void setExecutionStatus(Long executionId, org.squashtest.tm.domain.execution.ExecutionStatus status)
           
 void setExecutionStatus(Long executionId, org.squashtest.tm.domain.execution.ExecutionStatusReport report)
           
 void setExecutionStepComment(Long executionStepId, String comment)
           
 void updateExecutionMetadata(org.squashtest.tm.domain.testautomation.AutomatedExecutionExtender extender)
          Asks an execution to update it's metadata (lastExecutionOn, lastExecutedBy) according to automated execution business rules.
 void updateExecutionMetadata(org.squashtest.tm.domain.execution.Execution execution)
          Asks an execution to update it's metadata (lastExecutionOn, lastExecutedBy) according to regular execution business rules.
 boolean wasNeverRun(Long executionId)
          Tells whether the execution is fresh new or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionProcessingServiceImpl

public ExecutionProcessingServiceImpl()
Method Detail

findExecutionStep

public org.squashtest.tm.domain.execution.ExecutionStep findExecutionStep(Long executionStepId)
Specified by:
findExecutionStep in interface ExecutionProcessingService

wasNeverRun

public boolean wasNeverRun(Long executionId)
Description copied from interface: ExecutionProcessingService
Tells whether the execution is fresh new or not. Namely, that all its steps have a status READY.

Specified by:
wasNeverRun in interface ExecutionProcessingService
Returns:

findRunnableExecutionStep

public org.squashtest.tm.domain.execution.ExecutionStep findRunnableExecutionStep(long executionId)
                                                                           throws org.squashtest.tm.exception.execution.ExecutionHasNoStepsException
Specified by:
findRunnableExecutionStep in interface ExecutionProcessingService
Returns:
the first occurence of a running or ready ExecutionStep
Throws:
org.squashtest.tm.exception.execution.ExecutionHasNoStepsException

findStepAt

public org.squashtest.tm.domain.execution.ExecutionStep findStepAt(long executionId,
                                                                   int executionStepIndex)
Description copied from interface: ExecutionProcessingService
Returns, for a given execution and for a given step index, the corresponding ExecutionStep Will create the next step if the index corresponds to the one immediately following the last step, similarly to "nextExecutionStep"

Specified by:
findStepAt in interface ExecutionProcessingService
Returns:

changeExecutionStepStatus

public void changeExecutionStepStatus(Long executionStepId,
                                      org.squashtest.tm.domain.execution.ExecutionStatus status)
Description copied from interface: ExecutionProcessingService
Method which modify the execution step status
It implies :
* execution status update
* item test plan status update
* last execution date and user update for step, execution and item test plan

Specified by:
changeExecutionStepStatus in interface ExecutionProcessingService
Parameters:
executionStepId - the step id
status - the new status

setExecutionStepComment

public void setExecutionStepComment(Long executionStepId,
                                    String comment)
Specified by:
setExecutionStepComment in interface ExecutionProcessingService

findExecution

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

getExecutionSteps

public List<org.squashtest.tm.domain.execution.ExecutionStep> getExecutionSteps(Long executionId)
Specified by:
getExecutionSteps in interface ExecutionProcessingService

findExecutionStepRank

public int findExecutionStepRank(Long executionStepId)
Specified by:
findExecutionStepRank in interface ExecutionProcessingService

findTotalNumberSteps

public int findTotalNumberSteps(Long executionId)
Specified by:
findTotalNumberSteps in interface ExecutionProcessingService

setExecutionStatus

public void setExecutionStatus(Long executionId,
                               org.squashtest.tm.domain.execution.ExecutionStatus status)
Specified by:
setExecutionStatus in interface ExecutionProcessingService

getExecutionStatusReport

public org.squashtest.tm.domain.execution.ExecutionStatusReport getExecutionStatusReport(Long executionId)
Specified by:
getExecutionStatusReport in interface ExecutionProcessingService

updateExecutionMetadata

@PreAuthorize(value="hasPermission(#execution, \'EXECUTE\') or hasRole(\'ROLE_ADMIN\')")
public void updateExecutionMetadata(org.squashtest.tm.domain.execution.Execution execution)
Description copied from interface: ExecutionProcessingService
Asks an execution to update it's metadata (lastExecutionOn, lastExecutedBy) according to regular execution business rules.

Specified by:
updateExecutionMetadata in interface ExecutionProcessingService
Parameters:
execution - the execution to update

updateExecutionMetadata

@PreAuthorize(value="hasPermission(#extender, \'EXECUTE\') or hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_TA_API_CLIENT\')")
public void updateExecutionMetadata(org.squashtest.tm.domain.testautomation.AutomatedExecutionExtender extender)
Description copied from interface: ExecutionProcessingService
Asks an execution to update it's metadata (lastExecutionOn, lastExecutedBy) according to automated execution business rules. The said execution is the one referenced by the given extender.

Specified by:
updateExecutionMetadata in interface ExecutionProcessingService

setExecutionStatus

public void setExecutionStatus(Long executionId,
                               org.squashtest.tm.domain.execution.ExecutionStatusReport report)
Specified by:
setExecutionStatus in interface ExecutionProcessingService


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