mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Added method to delete multiple child contexts for unique property contexts
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16441 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -122,5 +122,31 @@ public class PropertyValueComponentTest extends TestCase
|
||||
logger.debug("Expected exception: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
// Delete everything for the store and check that both are creatable again
|
||||
RetryingTransactionCallback<Void> deleteStoreCallback = new RetryingTransactionCallback<Void>()
|
||||
{
|
||||
public Void execute() throws Throwable
|
||||
{
|
||||
propertyValueComponent.deletePropertyUniqueContexts(context, store);
|
||||
propertyValueComponent.createPropertyUniqueContext(context, store, uuid1);
|
||||
propertyValueComponent.createPropertyUniqueContext(context, store, uuid2);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
transactionService.getRetryingTransactionHelper().doInTransaction(deleteStoreCallback);
|
||||
|
||||
// Delete everything for the context and check that both are creatable again
|
||||
RetryingTransactionCallback<Void> deleteContextCallback = new RetryingTransactionCallback<Void>()
|
||||
{
|
||||
public Void execute() throws Throwable
|
||||
{
|
||||
propertyValueComponent.deletePropertyUniqueContexts(context);
|
||||
propertyValueComponent.createPropertyUniqueContext(context, store, uuid1);
|
||||
propertyValueComponent.createPropertyUniqueContext(context, store, uuid2);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
transactionService.getRetryingTransactionHelper().doInTransaction(deleteContextCallback);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user