org.squashtest.tm.service.internal.library
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() |
| 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 |
setFolderDao(FolderDao<FOLDER,NODE> folderDao) |
void |
setLibraryDao(LibraryDao<org.squashtest.tm.domain.library.Library<NODE>,NODE> libraryDao) |
void |
setNodeDao(EntityDao<MANAGED> nodeDao) |
void |
setPermissionService(PermissionEvaluationService permissionService) |
void |
updateNodeDescription(long nodeId,
String newDescription)
This method updates a node description
|
public void setPermissionService(PermissionEvaluationService permissionService)
@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)public void setLibraryDao(LibraryDao<org.squashtest.tm.domain.library.Library<NODE>,NODE> libraryDao)
Copyright © 2010-2014 Henix, henix.fr. All Rights Reserved.