Build fix. RuleServiceImpl was using big NodeService instead of runtimeNodeService to check types

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2394 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-02-15 17:45:25 +00:00
parent fb63c64b0a
commit f21edfd266
2 changed files with 13 additions and 6 deletions

View File

@@ -52,7 +52,7 @@ public class OwnableServiceTest extends TestCase
private NodeRef rootNodeRef; private NodeRef rootNodeRef;
private UserTransaction userTransaction; private UserTransaction txn;
private PermissionService permissionService; private PermissionService permissionService;
@@ -81,8 +81,8 @@ public class OwnableServiceTest extends TestCase
TransactionService transactionService = (TransactionService) ctx.getBean(ServiceRegistry.TRANSACTION_SERVICE.getLocalName()); TransactionService transactionService = (TransactionService) ctx.getBean(ServiceRegistry.TRANSACTION_SERVICE.getLocalName());
userTransaction = transactionService.getUserTransaction(); txn = transactionService.getUserTransaction();
userTransaction.begin(); txn.begin();
StoreRef storeRef = nodeService.createStore(StoreRef.PROTOCOL_WORKSPACE, "Test_" + System.currentTimeMillis()); StoreRef storeRef = nodeService.createStore(StoreRef.PROTOCOL_WORKSPACE, "Test_" + System.currentTimeMillis());
rootNodeRef = nodeService.getRootNode(storeRef); rootNodeRef = nodeService.getRootNode(storeRef);
@@ -102,9 +102,16 @@ public class OwnableServiceTest extends TestCase
@Override @Override
protected void tearDown() throws Exception protected void tearDown() throws Exception
{
try
{ {
authenticationComponent.clearCurrentSecurityContext(); authenticationComponent.clearCurrentSecurityContext();
userTransaction.rollback(); txn.rollback();
}
catch (Throwable e)
{
// don't absorb any exceptions going past
}
super.tearDown(); super.tearDown();
} }

View File

@@ -382,7 +382,7 @@ public class RuleServiceImpl implements RuleService, RuntimeRuleService
{ {
boolean result = true; boolean result = true;
QName nodeType = this.nodeService.getType(nodeRef); QName nodeType = this.runtimeNodeService.getType(nodeRef);
if (this.dictionaryService.isSubClass(nodeType, ContentModel.TYPE_SYSTEM_FOLDER) == true || if (this.dictionaryService.isSubClass(nodeType, ContentModel.TYPE_SYSTEM_FOLDER) == true ||
this.dictionaryService.isSubClass(nodeType, ActionModel.TYPE_ACTION) == true || this.dictionaryService.isSubClass(nodeType, ActionModel.TYPE_ACTION) == true ||
this.dictionaryService.isSubClass(nodeType, ActionModel.TYPE_ACTION_CONDITION) == true || this.dictionaryService.isSubClass(nodeType, ActionModel.TYPE_ACTION_CONDITION) == true ||