LIBRARY - FOLDER - NODE - @Transactional public abstract class AbstractLibraryNavigationService<LIBRARY extends org.squashtest.tm.domain.library.Library<NODE>,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>,NODE extends org.squashtest.tm.domain.library.LibraryNode> extends Object implements LibraryNavigationService<LIBRARY,FOLDER,NODE>
| Modifier and Type | Field and Description |
|---|---|
protected PermissionEvaluationService |
permissionService |
| Constructor and Description |
|---|
AbstractLibraryNavigationService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFolderToFolder(long destinationId,
FOLDER newFolder)
Id annotation is used by PreventConcurrent, BatchPreventConcurrent and PreventConcurrents in sub classes |
void |
addFolderToLibrary(long destinationId,
FOLDER newFolder)
Id annotation is used by PreventConcurrent, BatchPreventConcurrent and PreventConcurrents in sub classes |
protected void |
checkPermission(SecurityCheckableObject... checkableObjects) |
List<NODE> |
copyNodesToFolder(long destinationId,
Long[] sourceNodesIds)
will create a deep copy of the given LibraryNodes, paste them in the destination folder, and return the copies.
|
List<NODE> |
copyNodesToLibrary(long destinationId,
Long[] targetIds)
same, when the destination is a Library.
|
protected void |
createCustomFieldValues(org.squashtest.tm.domain.customfield.BoundEntity entity) |
protected void |
createCustomFieldValues(Collection<? extends org.squashtest.tm.domain.customfield.BoundEntity> entities) |
OperationReport |
deleteNodes(List<Long> targetIds)
that method should delete the nodes.
|
LIBRARY |
findCreatableLibrary(long libraryId) |
FOLDER |
findFolder(long folderId) |
List<NODE> |
findFolderContent(long folderId)
Returns the content of the folder designated by its id
|
LIBRARY |
findLibrary(long libraryId) |
LIBRARY |
findLibraryOfRootNodeIfExist(NODE node)
That method should find the library of the root node
|
List<NODE> |
findLibraryRootContent(long libraryId) |
FOLDER |
findParentIfExists(org.squashtest.tm.domain.library.LibraryNode node)
That method should find the parentFolder of the library Node if it has one
|
protected abstract NodeDeletionHandler<NODE,FOLDER> |
getDeletionHandler() |
protected abstract FolderDao<FOLDER,NODE> |
getFolderDao() |
protected abstract LibraryDao<LIBRARY,NODE> |
getLibraryDao() |
protected abstract LibraryNodeDao<NODE> |
getLibraryNodeDao() |
protected abstract PasteStrategy<FOLDER,NODE> |
getPasteToFolderStrategy() |
protected abstract PasteStrategy<LIBRARY,NODE> |
getPasteToLibraryStrategy() |
protected void |
initCustomFieldValues(org.squashtest.tm.domain.customfield.BoundEntity entity,
Map<Long,org.squashtest.tm.domain.customfield.RawValue> initialCustomFieldValues)
initialCustomFieldValues maps the id of a CustomField to the value of the corresponding CustomFieldValues for
that BoundEntity.
|
protected void |
makeCopierStrategy(PasteStrategy<?,?> pasteStrategy) |
protected void |
makeMoverStrategy(PasteStrategy<?,?> pasteStrategy) |
void |
moveNodesToFolder(long destinationId,
Long[] targetIds) |
void |
moveNodesToFolder(long destinationId,
Long[] targetIds,
int position) |
void |
moveNodesToLibrary(long destinationId,
Long[] targetIds) |
void |
moveNodesToLibrary(long destinationId,
Long[] targetIds,
int position) |
protected Set<Long> |
securityFilterIds(Collection<Long> original,
String entityType,
String permission) |
protected List<? extends org.squashtest.tm.domain.library.ExportData> |
setFullFolderPath(List<? extends org.squashtest.tm.domain.library.ExportData> dataset) |
List<SuppressionPreviewReport> |
simulateDeletion(List<Long> targetIds)
that method should investigate the consequences of the deletion request, and return a report about what will
happen.
|
@Inject protected PermissionEvaluationService permissionService
protected abstract LibraryDao<LIBRARY,NODE> getLibraryDao()
protected abstract LibraryNodeDao<NODE> getLibraryNodeDao()
protected abstract NodeDeletionHandler<NODE,FOLDER> getDeletionHandler()
protected abstract PasteStrategy<FOLDER,NODE> getPasteToFolderStrategy()
protected abstract PasteStrategy<LIBRARY,NODE> getPasteToLibraryStrategy()
@PostFilter(value="hasPermission(filterObject, \'READ\') or hasRole(\'ROLE_ADMIN\')") public final List<NODE> findLibraryRootContent(long libraryId)
findLibraryRootContent in interface LibraryNavigationService<LIBRARY extends org.squashtest.tm.domain.library.Library<NODE>,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>,NODE extends org.squashtest.tm.domain.library.LibraryNode>@PostFilter(value="hasPermission(filterObject, \'READ\') or hasRole(\'ROLE_ADMIN\')") public final List<NODE> findFolderContent(long folderId)
LibraryNavigationServicefindFolderContent in interface LibraryNavigationService<LIBRARY extends org.squashtest.tm.domain.library.Library<NODE>,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>,NODE extends org.squashtest.tm.domain.library.LibraryNode>public final LIBRARY findLibrary(long libraryId)
findLibrary in interface LibraryNavigationService<LIBRARY extends org.squashtest.tm.domain.library.Library<NODE>,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>,NODE extends org.squashtest.tm.domain.library.LibraryNode>public final LIBRARY findCreatableLibrary(long libraryId)
findCreatableLibrary in interface LibraryNavigationService<LIBRARY extends org.squashtest.tm.domain.library.Library<NODE>,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>,NODE extends org.squashtest.tm.domain.library.LibraryNode>public final FOLDER findFolder(long folderId)
findFolder in interface LibraryNavigationService<LIBRARY extends org.squashtest.tm.domain.library.Library<NODE>,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>,NODE extends org.squashtest.tm.domain.library.LibraryNode>public void addFolderToLibrary(long destinationId,
FOLDER newFolder)
LibraryNavigationServiceId annotation is used by PreventConcurrent, BatchPreventConcurrent and PreventConcurrents in sub classesaddFolderToLibrary in interface LibraryNavigationService<LIBRARY extends org.squashtest.tm.domain.library.Library<NODE>,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>,NODE extends org.squashtest.tm.domain.library.LibraryNode>public void addFolderToFolder(long destinationId,
FOLDER newFolder)
LibraryNavigationServiceId annotation is used by PreventConcurrent, BatchPreventConcurrent and PreventConcurrents in sub classesaddFolderToFolder in interface LibraryNavigationService<LIBRARY extends org.squashtest.tm.domain.library.Library<NODE>,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>,NODE extends org.squashtest.tm.domain.library.LibraryNode>public FOLDER findParentIfExists(org.squashtest.tm.domain.library.LibraryNode node)
LibraryNavigationServicefindParentIfExists in interface LibraryNavigationService<LIBRARY extends org.squashtest.tm.domain.library.Library<NODE>,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>,NODE extends org.squashtest.tm.domain.library.LibraryNode>public LIBRARY findLibraryOfRootNodeIfExist(NODE node)
LibraryNavigationServicefindLibraryOfRootNodeIfExist in interface LibraryNavigationService<LIBRARY extends org.squashtest.tm.domain.library.Library<NODE>,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>,NODE extends org.squashtest.tm.domain.library.LibraryNode>protected void createCustomFieldValues(org.squashtest.tm.domain.customfield.BoundEntity entity)
protected void createCustomFieldValues(Collection<? extends org.squashtest.tm.domain.customfield.BoundEntity> entities)
protected void initCustomFieldValues(org.squashtest.tm.domain.customfield.BoundEntity entity,
Map<Long,org.squashtest.tm.domain.customfield.RawValue> initialCustomFieldValues)
public void moveNodesToFolder(long destinationId,
Long[] targetIds)
moveNodesToFolder in interface LibraryNavigationService<LIBRARY extends org.squashtest.tm.domain.library.Library<NODE>,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>,NODE extends org.squashtest.tm.domain.library.LibraryNode>public void moveNodesToLibrary(long destinationId,
Long[] targetIds)
moveNodesToLibrary in interface LibraryNavigationService<LIBRARY extends org.squashtest.tm.domain.library.Library<NODE>,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>,NODE extends org.squashtest.tm.domain.library.LibraryNode>public void moveNodesToFolder(long destinationId,
Long[] targetIds,
int position)
moveNodesToFolder in interface LibraryNavigationService<LIBRARY extends org.squashtest.tm.domain.library.Library<NODE>,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>,NODE extends org.squashtest.tm.domain.library.LibraryNode>public void moveNodesToLibrary(long destinationId,
Long[] targetIds,
int position)
moveNodesToLibrary in interface LibraryNavigationService<LIBRARY extends org.squashtest.tm.domain.library.Library<NODE>,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>,NODE extends org.squashtest.tm.domain.library.LibraryNode>public List<NODE> copyNodesToFolder(long destinationId, Long[] sourceNodesIds)
LibraryNavigationServicecopyNodesToFolder in interface LibraryNavigationService<LIBRARY extends org.squashtest.tm.domain.library.Library<NODE>,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>,NODE extends org.squashtest.tm.domain.library.LibraryNode>destinationId - the id of the folder where you need to copy to.sourceNodesIds - the list of the librarynodes we want copies of.public List<NODE> copyNodesToLibrary(long destinationId, Long[] targetIds)
LibraryNavigationServicecopyNodesToLibrary in interface LibraryNavigationService<LIBRARY extends org.squashtest.tm.domain.library.Library<NODE>,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>,NODE extends org.squashtest.tm.domain.library.LibraryNode>destinationId - the id of the library where you need to copy to.targetIds - the list of the librarynodes we want copies of.public List<SuppressionPreviewReport> simulateDeletion(List<Long> targetIds)
LibraryNavigationServicesimulateDeletion in interface LibraryNavigationService<LIBRARY extends org.squashtest.tm.domain.library.Library<NODE>,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>,NODE extends org.squashtest.tm.domain.library.LibraryNode>public OperationReport deleteNodes(List<Long> targetIds)
LibraryNavigationServicedeleteNodes in interface LibraryNavigationService<LIBRARY extends org.squashtest.tm.domain.library.Library<NODE>,FOLDER extends org.squashtest.tm.domain.library.Folder<NODE>,NODE extends org.squashtest.tm.domain.library.LibraryNode>protected void makeCopierStrategy(PasteStrategy<?,?> pasteStrategy)
protected void makeMoverStrategy(PasteStrategy<?,?> pasteStrategy)
protected void checkPermission(SecurityCheckableObject... checkableObjects)
protected List<? extends org.squashtest.tm.domain.library.ExportData> setFullFolderPath(List<? extends org.squashtest.tm.domain.library.ExportData> dataset)
Copyright © 2010–2017 Henix, henix.fr. All rights reserved.