Here are the examples of the java api class org.alfresco.service.cmr.repository.CopyService taken from open source projects.
1. VirtualNodeServiceExtensionTest#testCopySemivirtualFolder()
Project: community-edition
File: VirtualNodeServiceExtensionTest.java
File: VirtualNodeServiceExtensionTest.java
@Test public void testCopySemivirtualFolder() throws Exception { configuredTemplatesClassPath = constraints.getTemplatesParentClasspath(); constraints.setTemplatesParentClasspath("/org/alfresco/repo/virtual/template"); IntegrityChecker integrityChecker = (IntegrityChecker) ctx.getBean("integrityChecker"); NodeRef childRef = createFolder(testRootFolder.getNodeRef(), "TT").getChildRef(); CopyService copyService = ctx.getBean("copyService", CopyService.class); copyService.copyAndRename(virtualFolder1NodeRef, childRef, ContentModel.ASSOC_CONTAINS, null, true); NodeRef copiedNodeRef = nodeService.getChildByName(childRef, ContentModel.ASSOC_CONTAINS, VIRTUAL_FOLDER_1_NAME); assertNotNull(copiedNodeRef); NodeRef node2 = nodeService.getChildByName(copiedNodeRef, ContentModel.ASSOC_CONTAINS, "Node2"); assertNotNull(node2); NodeRef node2_1 = nodeService.getChildByName(node2, ContentModel.ASSOC_CONTAINS, "Node2_1"); assertNotNull(node2_1); integrityChecker.checkIntegrity(); }