org.squashtest.csp.tm.service
Interface LibraryNavigationService<LIBRARY extends Library<? extends NODE>,FOLDER extends Folder<? extends NODE>,NODE extends LibraryNode>

All Known Subinterfaces:
CampaignLibraryNavigationService, RequirementLibraryNavigationService, TestCaseLibraryNavigationService
All Known Implementing Classes:
AbstractLibraryNavigationService, CampaignLibraryNavigationServiceImpl, RequirementLibraryNavigationServiceImpl, TestCaseLibraryNavigationServiceImpl

public interface LibraryNavigationService<LIBRARY extends Library<? extends NODE>,FOLDER extends Folder<? extends NODE>,NODE extends LibraryNode>

Defines common methods for a library navigation service, mainly library access and folder manipulation. TODO Move all methods which modify a folder's content to another service

Author:
Gregory Fouquet

Method Summary
 void addFolderToFolder(long destinationId, FOLDER newFolder)
           
 void addFolderToLibrary(long destinationId, FOLDER newFolder)
           
 List<NODE> copyNodesToFolder(long destinationId, Long[] targetId)
          will create a deep copy of the given LibraryNodes, paste them in the target folder, and return the copies.
 List<NODE> copyNodesToLibrary(long destinationId, Long[] targetId)
          same, when the destination is a Library.
 List<Long> deleteNodes(List<Long> targetIds)
          that method should delete the nodes.
 FOLDER findFolder(long folderId)
           
 List<NODE> findFolderContent(long folderId)
          Returns the content of the folder designated by its id.
 LIBRARY findLibrary(long libraryId)
           
 List<NODE> findLibraryRootContent(long libraryId)
           
 void modeNodesToFolder(long destinationId, Long[] targetId)
           
 void moveNodesToLibrary(long destinationId, Long[] targetId)
           
 void renameFolder(long folderId, String newName)
          Deprecated. 
 List<SuppressionPreviewReport> simulateDeletion(List<Long> targetIds)
          that method should investigate the consequences of the deletion request, and return a report about what will happen.
 

Method Detail

copyNodesToFolder

List<NODE> copyNodesToFolder(long destinationId,
                             Long[] targetId)
will create a deep copy of the given LibraryNodes, paste them in the target folder, and return the copies.

Parameters:
destinationId - the id of the folder where you need to copy to.
targetId - the list of the librarynodes we want copies of.
Returns:
the list of the copies themselves.

copyNodesToLibrary

List<NODE> copyNodesToLibrary(long destinationId,
                              Long[] targetId)
same, when the destination is a Library.

Parameters:
destinationId - the id of the library where you need to copy to.
targetId - the list of the librarynodes we want copies of.
Returns:
the list of the copies themselves.

modeNodesToFolder

void modeNodesToFolder(long destinationId,
                       Long[] targetId)

moveNodesToLibrary

void moveNodesToLibrary(long destinationId,
                        Long[] targetId)

addFolderToLibrary

void addFolderToLibrary(long destinationId,
                        FOLDER newFolder)

addFolderToFolder

void addFolderToFolder(long destinationId,
                       FOLDER newFolder)

findFolder

FOLDER findFolder(long folderId)

findLibraryRootContent

List<NODE> findLibraryRootContent(long libraryId)

findFolderContent

List<NODE> findFolderContent(long folderId)
Returns the content of the folder designated by its id.

Parameters:
folderId -
Returns:

renameFolder

@Deprecated
void renameFolder(long folderId,
                             String newName)
Deprecated. 


findLibrary

LIBRARY findLibrary(long libraryId)

simulateDeletion

List<SuppressionPreviewReport> simulateDeletion(List<Long> targetIds)
that method should investigate the consequences of the deletion request, and return a report about what will happen.

Parameters:
targetIds -
Returns:

deleteNodes

List<Long> deleteNodes(List<Long> targetIds)
that method should delete the nodes. It still takes care of non deletable nodes so the implementation should filter out the ids who can't be deleted.

Parameters:
targetIds -
Returns:


Copyright © 2010-2012 Squashtest TM, Squashtest.org. All Rights Reserved.