Merged V3.2 to HEAD

17294: Fix for ETHREEOH-3194 - It's impossible to find Blogs and Discussions by title.
   17301: Activity Service fixes (ETHREEOH-1362 & ETHREEOH-1741)
   17302: Fix for ETHREEOH-2849 JPG to GIF transformation fails when using imagemagick cmd line options listed in our wiki
   17305: AVM - fix AVMStoreDescriptor ( creator/createDate) returned by getStores
   17306: Fix for ETHREEOH-1578 - Incorrect behavior of Calendar in Month view ...
   17318: Merged V3.1 to V3.2
      17317: Fix for ETHREEOH-3236 It is impossible to change start location, everything is reverted to My Alfresco
   17320: Merged V3.1 to V3.2
      17287 - Fix for ETHREEOH-110- It is impossible to browse events by tags
   17326: iBatis mapping fixes for AVM on Oracle (including ETHREEOH-3205)
   17327: Merged V3.1 to V3.2
      17324: Fix for ETHREEOH-2723 Script error appears when trying to edit Home Space Name for user
   17329: Merged V3.1 to V3.2
      17180: Merged V2.2 to V3.1
         17164: Fixes for deletion of large hierarchies: (ETHREEOH-2161 and ETHREEOH-2650)
         17179: (RECORD ONLY) Merged V3.1 to V2.2 ...
   17330: Fix for SiteActivityTest failure (caused by earlier -ve test data)
   17331: Merged V3.1 to V3.2
      17190: Further fixes for ETHREEOH-2161: Delete process hangs when deleting large directory structure (with rules applied)
      17207: Fix fallout from work on ETHREEOH-2161: Delete process hangs when deleting large directory structure (with rules applied)
      17215: Added back firing of policies for archive stores
   17351: Build fix check in to DBNodeService.    Will be followed by full fix when available.
   17353: Applied TransactionListenerAdapter
___________________________________________________________________
Modified: svn:mergeinfo
   Reverse-merged /alfresco/BRANCHES/V3.1:r13091
   Merged /alfresco/BRANCHES/V2.2:r13089,13091,14190-14191,14199,14210,14216,14229,14655,14825,14869,17164,17179
   Merged /alfresco/BRANCHES/V3.1:r17180,17190,17207,17215,17287,17317,17324
   Merged /alfresco/BRANCHES/V3.2:r17294,17301-17302,17305-17306,17318,17320,17326-17327,17329-17331,17351,17353


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18056 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2010-01-15 11:09:09 +00:00
parent 354faccbc3
commit e2fbd4a8de
24 changed files with 1671 additions and 1446 deletions

View File

@@ -38,8 +38,6 @@ import org.springframework.extensions.surf.util.I18NUtil;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.repo.node.BaseNodeServiceTest;
import org.alfresco.repo.node.StoreArchiveMap;
import org.alfresco.repo.node.cleanup.NodeCleanupRegistry;
import org.alfresco.repo.node.db.NodeDaoService.NodePropertyHandler;
import org.alfresco.repo.transaction.AlfrescoTransactionSupport;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
@@ -50,7 +48,6 @@ import org.alfresco.service.cmr.repository.ContentData;
import org.alfresco.service.cmr.repository.MLText;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.namespace.QName;
import org.alfresco.service.namespace.RegexQNamePattern;
import org.alfresco.service.transaction.TransactionService;
@@ -73,7 +70,6 @@ public class DbNodeServiceImplTest extends BaseNodeServiceTest
{
// Force cascading
DbNodeServiceImpl dbNodeServiceImpl = (DbNodeServiceImpl) applicationContext.getBean("dbNodeServiceImpl");
dbNodeServiceImpl.setCascadeInTransaction(true);
return (NodeService) applicationContext.getBean("dbNodeService");
}
@@ -402,49 +398,6 @@ public class DbNodeServiceImplTest extends BaseNodeServiceTest
nodeService.deleteNode(nodeRef);
}
public void testCleanup() throws Exception
{
@SuppressWarnings("unchecked")
StoreArchiveMap storeArchiveMap = (StoreArchiveMap) applicationContext.getBean("storeArchiveMap");
DbNodeServiceImpl ns = (DbNodeServiceImpl) applicationContext.getBean("dbNodeServiceImpl");
ns.setCascadeInTransaction(false);
NodeRef parentNodeRef = nodeService.createNode(
rootNodeRef,
ASSOC_TYPE_QNAME_TEST_CHILDREN,
QName.createQName(NAMESPACE, this.getName()),
ContentModel.TYPE_FOLDER).getChildRef();
NodeRef childNodeRef = nodeService.createNode(
parentNodeRef,
ContentModel.ASSOC_CONTAINS,
QName.createQName(NAMESPACE, this.getName()),
ContentModel.TYPE_FOLDER).getChildRef();
// Ensure that the archive feature is enabled
StoreRef archiveStoreRef = ns.createStore("test", getName() + "-" + System.currentTimeMillis());
storeArchiveMap.put(parentNodeRef.getStoreRef(), archiveStoreRef);
// Delete parent. Cascade is OFF, so children should be left in their current store.
ns.deleteNode(parentNodeRef);
// Check that the node n1 is in the archive store
assertFalse("Parent should be deleted", ns.exists(parentNodeRef));
NodeRef parentArchiveRef = new NodeRef(archiveStoreRef, parentNodeRef.getId());
assertTrue("Parent should be in the archive store", ns.exists(parentArchiveRef));
// Force a commit here
setComplete();
endTransaction();
NodeCleanupRegistry nodeCleanupRegistry = new NodeCleanupRegistry();
DbNodeServiceImpl.MoveChildrenToCorrectStore worker = new DbNodeServiceImpl.MoveChildrenToCorrectStore();
worker.setTransactionService(transactionService);
worker.setDbNodeService(ns);
worker.setNodeDaoService(nodeDaoService);
// Run cleanup
worker.doClean();
}
/**
* Adds a property to a node and checks that it can be found using the low-level DB query
*/