|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.squashtest.tm.service.internal.library.AbstractLibraryNavigationService<LIBRARY,FOLDER,NODE>
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>
Generic implementation of a library navigation service.
| Field Summary | |
|---|---|
protected static String |
COPY_TOKEN
token appended to the name of a copy |
protected PermissionEvaluationService |
permissionService
|
| Constructor Summary | |
|---|---|
AbstractLibraryNavigationService()
|
|
| Method Summary | |
|---|---|
void |
addFolderToFolder(long destinationId,
FOLDER newFolder)
|
void |
addFolderToLibrary(long destinationId,
FOLDER newFolder)
|
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 |
int |
generateUniqueCopyNumber(List<String> copiesNames,
String sourceName)
|
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,String> initialCustomFieldValues)
|
protected void |
makeCopierStrategy(PasteStrategy<?,?> pasteStrategy)
|
protected void |
makeMoverStrategy(PasteStrategy<?,?> pasteStrategy)
|
void |
moveNodesToFolder(long destinationId,
Long[] targetIds)
|
void |
moveNodesToLibrary(long destinationId,
Long[] targetIds)
|
void |
renameFolder(long folderId,
String newName)
Deprecated. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String COPY_TOKEN
@Inject protected PermissionEvaluationService permissionService
| Constructor Detail |
|---|
public AbstractLibraryNavigationService()
| Method Detail |
|---|
protected abstract FolderDao<FOLDER,NODE> getFolderDao()
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)
LibraryNavigationService
findFolderContent 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>
@Deprecated
public final void renameFolder(long folderId,
String newName)
renameFolder 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 void addFolderToLibrary(long destinationId,
FOLDER newFolder)
addFolderToLibrary 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 void addFolderToFolder(long destinationId,
FOLDER newFolder)
addFolderToFolder 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)
LibraryNavigationService
findParentIfExists 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)
LibraryNavigationService
findLibraryOfRootNodeIfExist 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,String> 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 List<NODE> copyNodesToFolder(long destinationId,
Long[] sourceNodesIds)
LibraryNavigationService
copyNodesToFolder 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)
LibraryNavigationService
copyNodesToLibrary 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 int generateUniqueCopyNumber(List<String> copiesNames,
String sourceName)
public List<SuppressionPreviewReport> simulateDeletion(List<Long> targetIds)
LibraryNavigationService
simulateDeletion 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)
LibraryNavigationService
deleteNodes 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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||