FOLDER - Type of folder which can contain managed typeNODE - Type of common node supertype of FOLDER and MANAGEDMANAGED - Type of nodes manged by this class@Transactional public class GenericNodeManagementService<MANAGED extends org.squashtest.tm.domain.library.LibraryNode,NODE extends org.squashtest.tm.domain.library.LibraryNode,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>> extends Object implements NodeManagementService<MANAGED,NODE,FOLDER>
| Constructor and Description |
|---|
GenericNodeManagementService(PermissionEvaluationService permissionService,
EntityDao<MANAGED> nodeDao,
FolderDao<FOLDER,NODE> folderDao,
LibraryDao<? extends org.squashtest.tm.domain.library.Library<NODE>,NODE> libraryDao) |
| Modifier and Type | Method and Description |
|---|---|
MANAGED |
findNode(long nodeId)
Finds a node by its ID.
|
void |
removeNode(long nodeId)
Removes a node from repository by its ID.
|
void |
renameNode(long nodeId,
String newName)
Renames a node by its ID after checking that there is no name clash in the node's container.
|
void |
updateNodeDescription(long nodeId,
String newDescription)
This method updates a node description
|
public GenericNodeManagementService(PermissionEvaluationService permissionService, EntityDao<MANAGED> nodeDao, FolderDao<FOLDER,NODE> folderDao, LibraryDao<? extends org.squashtest.tm.domain.library.Library<NODE>,NODE> libraryDao)
@Transactional(readOnly=true) @PostAuthorize(value="hasPermission(returnObject, \'READ\') or hasRole(\'ROLE_ADMIN\')") public MANAGED findNode(long nodeId)
NodeManagementServicepublic void removeNode(long nodeId)
NodeManagementServiceremoveNode in interface NodeManagementService<MANAGED extends org.squashtest.tm.domain.library.LibraryNode,NODE extends org.squashtest.tm.domain.library.LibraryNode,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>>public final void renameNode(long nodeId,
String newName)
throws org.squashtest.tm.exception.DuplicateNameException
NodeManagementServicerenameNode in interface NodeManagementService<MANAGED extends org.squashtest.tm.domain.library.LibraryNode,NODE extends org.squashtest.tm.domain.library.LibraryNode,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>>org.squashtest.tm.exception.DuplicateNameException - if the node's container already contains a node with the new name.public final void updateNodeDescription(long nodeId,
String newDescription)
NodeManagementServiceupdateNodeDescription in interface NodeManagementService<MANAGED extends org.squashtest.tm.domain.library.LibraryNode,NODE extends org.squashtest.tm.domain.library.LibraryNode,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>>nodeId - the node idnewDescription - the new description (String)Copyright © 2010–2017 Henix, henix.fr. All rights reserved.