diff --git a/config/alfresco/hibernate-context.xml b/config/alfresco/hibernate-context.xml index 095330aa22..83983c5438 100644 --- a/config/alfresco/hibernate-context.xml +++ b/config/alfresco/hibernate-context.xml @@ -193,13 +193,10 @@ - + - - - diff --git a/config/alfresco/public-services-context.xml b/config/alfresco/public-services-context.xml index 9fb335bc94..2abcb78b35 100644 --- a/config/alfresco/public-services-context.xml +++ b/config/alfresco/public-services-context.xml @@ -258,6 +258,9 @@ + + + diff --git a/config/alfresco/workflow/workflowModel.xml b/config/alfresco/workflow/workflowModel.xml index 13224b1cf4..4953635bab 100644 --- a/config/alfresco/workflow/workflowModel.xml +++ b/config/alfresco/workflow/workflowModel.xml @@ -53,6 +53,20 @@ + + bpm:workflowTask + + bpm:assignee + + + + + bpm:workflowTask + + bpm:assignee + + + bpm:workflowTask @@ -99,6 +113,9 @@ bpm:workflowTask + + bpm:assignee + diff --git a/source/java/org/alfresco/repo/admin/patch/util/ImportFileUpdater.java b/source/java/org/alfresco/repo/admin/patch/util/ImportFileUpdater.java index 4148f74de8..9465ab7320 100644 --- a/source/java/org/alfresco/repo/admin/patch/util/ImportFileUpdater.java +++ b/source/java/org/alfresco/repo/admin/patch/util/ImportFileUpdater.java @@ -564,7 +564,7 @@ public class ImportFileUpdater } else { - System.out.println(" ImportFileUpdater "); + System.out.println(" ImportFileUpdater "); System.out.println(" source - 1.3 import file name to be updated"); System.out.println(" destination - name of the generated 1.4 import file"); } diff --git a/source/java/org/alfresco/repo/domain/hibernate/VersionCounterDaoComponentImpl.java b/source/java/org/alfresco/repo/domain/hibernate/VersionCounterDaoComponentImpl.java index a64a572228..d462bb2b13 100644 --- a/source/java/org/alfresco/repo/domain/hibernate/VersionCounterDaoComponentImpl.java +++ b/source/java/org/alfresco/repo/domain/hibernate/VersionCounterDaoComponentImpl.java @@ -40,48 +40,8 @@ import org.springframework.orm.hibernate3.support.HibernateDaoSupport; */ public class VersionCounterDaoComponentImpl extends HibernateDaoSupport - implements VersionCounterService, NodeServicePolicies.BeforeCreateStorePolicy + implements VersionCounterService { - private PolicyComponent policyComponent; - - /** - * @param policyComponent the component to register behaviour - */ - public void setPolicyComponent(PolicyComponent policyComponent) - { - this.policyComponent = policyComponent; - } - - /** - * Bind to receive notifications of store creations - */ - public void init() - { - policyComponent.bindClassBehaviour( - QName.createQName(NamespaceService.ALFRESCO_URI, "beforeCreateStore"), - this, - new JavaBehaviour(this, "beforeCreateStore")); - } - - /** - * Create a version counter for the store - * @param nodeTypeQName - * @param storeRef - */ - public void beforeCreateStore(QName nodeTypeQName, StoreRef storeRef) - { - final StoreKey storeKey = new StoreKey(storeRef.getProtocol(), storeRef.getIdentifier()); - VersionCount versionCount = (VersionCount) getHibernateTemplate().get(VersionCountImpl.class, storeKey); - if (versionCount != null) - { - // already exists - return; - } - versionCount = new VersionCountImpl(); - versionCount.setKey(storeKey); - getHibernateTemplate().save(versionCount); - } - /** * Retrieves or creates a version counter. This locks the counter against updates for the * current transaction. diff --git a/source/java/org/alfresco/repo/node/archive/ArchiveAndRestoreTest.java b/source/java/org/alfresco/repo/node/archive/ArchiveAndRestoreTest.java index 1ac6c4a274..50f3ce69e4 100644 --- a/source/java/org/alfresco/repo/node/archive/ArchiveAndRestoreTest.java +++ b/source/java/org/alfresco/repo/node/archive/ArchiveAndRestoreTest.java @@ -520,7 +520,7 @@ public class ArchiveAndRestoreTest extends TestCase public void testInTransactionRestore() throws Exception { - RestoreNodeReport report = nodeArchiveService.restoreArchivedNode(a); + RestoreNodeReport report = nodeArchiveService.restoreArchivedNode(a_); // expect a failure due to missing archive node assertEquals("Expected failure", RestoreStatus.FAILURE_INVALID_ARCHIVE_NODE, report.getStatus()); // check that our transaction was not affected @@ -529,10 +529,8 @@ public class ArchiveAndRestoreTest extends TestCase public void testInTransactionPurge() throws Exception { - nodeArchiveService.purgeArchivedNode(a); + nodeArchiveService.purgeArchivedNode(a_); // the node should still be there (it was not available to the purge transaction) - assertTrue("Node should not have been touched", nodeService.exists(a)); - // check that our transaction was not affected assertEquals("Transaction should still be valid", Status.STATUS_ACTIVE, txn.getStatus()); } @@ -617,6 +615,8 @@ public class ArchiveAndRestoreTest extends TestCase */ public void testPermissionsForRestore() throws Exception { + + // user A deletes 'a' authenticationService.authenticate(USER_A, USER_A.toCharArray()); nodeService.deleteNode(a); @@ -624,6 +624,7 @@ public class ArchiveAndRestoreTest extends TestCase authenticationService.authenticate(USER_B, USER_B.toCharArray()); nodeService.deleteNode(b); + commitAndBeginNewTransaction(); // user B can't see archived 'a' List restoredByB = nodeArchiveService.restoreAllArchivedNodes(workStoreRef); assertEquals("User B should be able to see only B's delete", 1, restoredByB.size()); diff --git a/source/java/org/alfresco/repo/node/index/AbstractReindexComponent.java b/source/java/org/alfresco/repo/node/index/AbstractReindexComponent.java index 2d4f597540..9bf0b4d3bc 100644 --- a/source/java/org/alfresco/repo/node/index/AbstractReindexComponent.java +++ b/source/java/org/alfresco/repo/node/index/AbstractReindexComponent.java @@ -446,10 +446,8 @@ public abstract class AbstractReindexComponent implements IndexRecovery } else // node created { - // get the primary assoc for the node - ChildAssociationRef primaryAssocRef = nodeService.getPrimaryParent(nodeRef); // reindex - indexer.createNode(primaryAssocRef); + indexer.updateNode(nodeRef); } } // done diff --git a/source/java/org/alfresco/repo/transaction/AlfrescoTransactionSupport.java b/source/java/org/alfresco/repo/transaction/AlfrescoTransactionSupport.java index 357ceea309..f08d6a5f87 100644 --- a/source/java/org/alfresco/repo/transaction/AlfrescoTransactionSupport.java +++ b/source/java/org/alfresco/repo/transaction/AlfrescoTransactionSupport.java @@ -370,9 +370,7 @@ public abstract class AlfrescoTransactionSupport return txnSynch; } // we need a unique ID for the transaction - StringBuilder sb = new StringBuilder(56); - sb.append(System.currentTimeMillis()).append(":").append(GUID.generate()); - String txnId = sb.toString(); + String txnId = GUID.generate(); // register the synchronization txnSynch = new TransactionSynchronizationImpl(txnId); TransactionSynchronizationManager.registerSynchronization(txnSynch); diff --git a/source/java/org/alfresco/repo/version/common/counter/VersionCounterService.java b/source/java/org/alfresco/repo/version/common/counter/VersionCounterService.java index c45aeb35ec..5b72a14d11 100644 --- a/source/java/org/alfresco/repo/version/common/counter/VersionCounterService.java +++ b/source/java/org/alfresco/repo/version/common/counter/VersionCounterService.java @@ -26,14 +26,6 @@ import org.alfresco.service.namespace.QName; */ public interface VersionCounterService { - /** - * Helper method for simple patching - * - * @param nodeTypeQName not used - * @param storeRef the store to create a counter for - */ - public void beforeCreateStore(QName nodeTypeQName, StoreRef storeRef); - /** * Get the next available version number for the specified store. * diff --git a/source/java/org/alfresco/repo/workflow/WorkflowInterpreter.java b/source/java/org/alfresco/repo/workflow/WorkflowInterpreter.java index 21492688bf..a1a09460c3 100644 --- a/source/java/org/alfresco/repo/workflow/WorkflowInterpreter.java +++ b/source/java/org/alfresco/repo/workflow/WorkflowInterpreter.java @@ -648,7 +648,7 @@ public class WorkflowInterpreter return "Syntax Error. Workflow Id not specified.\n"; } workflowService.cancelWorkflow(workflowId); - out.println("cancelled workflow" + workflowId); + out.println("workflow " + workflowId + " cancelled."); out.print(interpretCommand("show transitions")); } else