org.squashtest.csp.tm.internal.service
Class TestCaseLibraryNavigationServiceImpl

java.lang.Object
  extended by org.squashtest.csp.tm.internal.service.AbstractLibraryNavigationService<TestCaseLibrary,TestCaseFolder,TestCaseLibraryNode>
      extended by org.squashtest.csp.tm.internal.service.TestCaseLibraryNavigationServiceImpl
All Implemented Interfaces:
LibraryNavigationService<TestCaseLibrary,TestCaseFolder,TestCaseLibraryNode>, TestCaseLibraryFinderService, TestCaseLibraryNavigationService

@Service(value="squashtest.tm.service.TestCaseLibraryNavigationService")
@Transactional
public class TestCaseLibraryNavigationServiceImpl
extends AbstractLibraryNavigationService<TestCaseLibrary,TestCaseFolder,TestCaseLibraryNode>
implements TestCaseLibraryNavigationService


Nested Class Summary
 
Nested classes/interfaces inherited from class org.squashtest.csp.tm.internal.service.AbstractLibraryNavigationService
AbstractLibraryNavigationService.SecurityCheckableObject
 
Field Summary
 
Fields inherited from class org.squashtest.csp.tm.internal.service.AbstractLibraryNavigationService
COPY_TOKEN
 
Constructor Summary
TestCaseLibraryNavigationServiceImpl()
           
 
Method Summary
 void addTestCaseToFolder(long folderId, TestCase testCase)
           
 void addTestCaseToLibrary(long libraryId, TestCase testCase)
           
 List<TestCaseLibrary> findLinkableTestCaseLibraries()
          Returns the collection of TestCaseLibrarys which TestCases can be linked by a TestCase via a CallTestStep
 TestCase findTestCase(long testCaseId)
           
protected  NodeDeletionHandler<TestCaseLibraryNode,TestCaseFolder> getDeletionHandler()
           
protected  FolderDao<TestCaseFolder,TestCaseLibraryNode> getFolderDao()
           
protected  LibraryDao<TestCaseLibrary,TestCaseLibraryNode> getLibraryDao()
           
protected  LibraryNodeDao<TestCaseLibraryNode> getLibraryNodeDao()
           
 String getPathAsString(long entityId)
          Returns the path of a TestCaseLibraryNode given its id.
 ImportSummary importExcelTestCase(InputStream archiveStream, long libraryId, String encoding)
          Accepts a stream to a .zip file containing regular folders or excel files and nothing else.
 
Methods inherited from class org.squashtest.csp.tm.internal.service.AbstractLibraryNavigationService
addFolderToFolder, addFolderToLibrary, checkPermission, copyNodesToFolder, copyNodesToLibrary, createCopyFolder, createPastableCopy, deleteNodes, findCreatableLibrary, findFolder, findFolderContent, findLibrary, findLibraryOfRootNodeIfExist, findLibraryRootContent, findParentIfExists, generateUniqueCopyNumber, modeNodesToFolder, moveNodesToLibrary, renameFolder, setPermissionService, simulateDeletion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.squashtest.csp.tm.service.LibraryNavigationService
addFolderToFolder, addFolderToLibrary, copyNodesToFolder, copyNodesToLibrary, deleteNodes, findCreatableLibrary, findFolder, findFolderContent, findLibrary, findLibraryOfRootNodeIfExist, findLibraryRootContent, findParentIfExists, modeNodesToFolder, moveNodesToLibrary, renameFolder, simulateDeletion
 

Constructor Detail

TestCaseLibraryNavigationServiceImpl

public TestCaseLibraryNavigationServiceImpl()
Method Detail

getDeletionHandler

protected NodeDeletionHandler<TestCaseLibraryNode,TestCaseFolder> getDeletionHandler()
Specified by:
getDeletionHandler in class AbstractLibraryNavigationService<TestCaseLibrary,TestCaseFolder,TestCaseLibraryNode>

getLibraryDao

protected LibraryDao<TestCaseLibrary,TestCaseLibraryNode> getLibraryDao()
Specified by:
getLibraryDao in class AbstractLibraryNavigationService<TestCaseLibrary,TestCaseFolder,TestCaseLibraryNode>

getFolderDao

protected FolderDao<TestCaseFolder,TestCaseLibraryNode> getFolderDao()
Specified by:
getFolderDao in class AbstractLibraryNavigationService<TestCaseLibrary,TestCaseFolder,TestCaseLibraryNode>

getLibraryNodeDao

protected final LibraryNodeDao<TestCaseLibraryNode> getLibraryNodeDao()
Specified by:
getLibraryNodeDao in class AbstractLibraryNavigationService<TestCaseLibrary,TestCaseFolder,TestCaseLibraryNode>

findTestCase

@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.csp.tm.domain.testcase.TestCase\' , \'READ\') or hasRole(\'ROLE_ADMIN\')")
public TestCase findTestCase(long testCaseId)
Specified by:
findTestCase in interface TestCaseLibraryNavigationService

getPathAsString

public String getPathAsString(long entityId)
Description copied from interface: TestCaseLibraryFinderService
Returns the path of a TestCaseLibraryNode given its id. The format is standard, beginning with /<project-name>

Specified by:
getPathAsString in interface TestCaseLibraryFinderService
Parameters:
entityId - the id of the node.
Returns:
the path of that node.

addTestCaseToLibrary

@PreAuthorize(value="hasPermission(#libraryId, \'org.squashtest.csp.tm.domain.testcase.TestCaseLibrary\' , \'CREATE\' )or hasRole(\'ROLE_ADMIN\')")
public void addTestCaseToLibrary(long libraryId,
                                              TestCase testCase)
Specified by:
addTestCaseToLibrary in interface TestCaseLibraryNavigationService

addTestCaseToFolder

@PreAuthorize(value="hasPermission(#folderId, \'org.squashtest.csp.tm.domain.testcase.TestCaseFolder\' , \'CREATE\') or hasRole(\'ROLE_ADMIN\')")
public void addTestCaseToFolder(long folderId,
                                             TestCase testCase)
Specified by:
addTestCaseToFolder in interface TestCaseLibraryNavigationService

importExcelTestCase

@PreAuthorize(value="hasPermission(#libraryId, \'org.squashtest.csp.tm.domain.testcase.TestCaseLibrary\', \'IMPORT\') or hasRole(\'ROLE_ADMIN\')")
public ImportSummary importExcelTestCase(InputStream archiveStream,
                                                      long libraryId,
                                                      String encoding)
Description copied from interface: TestCaseLibraryNavigationService
Accepts a stream to a .zip file containing regular folders or excel files and nothing else. Will convert the test cases from excel to squash.

Specified by:
importExcelTestCase in interface TestCaseLibraryNavigationService
libraryId - the identifier of the library we are importing test cases into.
encoding - the encoding
Returns:
a summary of the operations.

findLinkableTestCaseLibraries

@PostFilter(value="hasPermission(filterObject, \'LINK\') or hasRole(\'ROLE_ADMIN\')")
public List<TestCaseLibrary> findLinkableTestCaseLibraries()
Description copied from interface: TestCaseLibraryFinderService
Returns the collection of TestCaseLibrarys which TestCases can be linked by a TestCase via a CallTestStep

Specified by:
findLinkableTestCaseLibraries in interface TestCaseLibraryFinderService
Returns:


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