Content and folder node archival

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2767 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-05-04 16:04:55 +00:00
parent 35f3eda32f
commit fcad8b7a1f
29 changed files with 722 additions and 198 deletions

View File

@@ -112,7 +112,7 @@ public class DbNodeServiceImplTest extends BaseNodeServiceTest
* <li>deletion</li>
* </ul>
*/
public void testNodeStatus() throws Exception
public void testNodeStatus() throws Throwable
{
Map<QName, ChildAssociationRef> assocRefs = buildNodeGraph();
// get the node to play with
@@ -190,13 +190,13 @@ public class DbNodeServiceImplTest extends BaseNodeServiceTest
public Object doWork()
{
// check n6
NodeStatus n6Status = nodeDaoService.getNodeStatus(n6Ref);
NodeStatus n6Status = nodeDaoService.getNodeStatus(n6Ref, false);
if (!n6Status.isDeleted())
{
throw new RuntimeException("Deleted node does not have deleted status");
}
// n8 is a primary child - it should be deleted too
NodeStatus n8Status = nodeDaoService.getNodeStatus(n8Ref);
NodeStatus n8Status = nodeDaoService.getNodeStatus(n8Ref, false);
if (!n8Status.isDeleted())
{
throw new RuntimeException("Cascade-deleted node does not have deleted status");
@@ -228,7 +228,7 @@ public class DbNodeServiceImplTest extends BaseNodeServiceTest
TransactionUtil.executeInUserTransaction(txnService, checkRecreateWork);
}
private void executeAndCheck(NodeRef nodeRef, TransactionWork<Object> work) throws Exception
private void executeAndCheck(NodeRef nodeRef, TransactionWork<Object> work) throws Throwable
{
UserTransaction txn = txnService.getUserTransaction();
txn.begin();
@@ -248,7 +248,7 @@ public class DbNodeServiceImplTest extends BaseNodeServiceTest
assertEquals("Change didn't update status", currentTxnId, newStatus.getChangeTxnId());
txn.commit();
}
catch (Exception e)
catch (Throwable e)
{
try { txn.rollback(); } catch (Throwable ee) {}
throw e;