mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merging from EC-MC: Initial work to move interceptors and correct bean names
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5743 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -691,14 +691,15 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
||||
|
||||
public void deleteNode(NodeRef nodeRef)
|
||||
{
|
||||
// First get the node to ensure that it exists
|
||||
Node node = getNodeNotNull(nodeRef);
|
||||
|
||||
boolean isArchivedNode = false;
|
||||
boolean requiresDelete = false;
|
||||
|
||||
// Invoke policy behaviours
|
||||
invokeBeforeDeleteNode(nodeRef);
|
||||
|
||||
// get the node
|
||||
Node node = getNodeNotNull(nodeRef);
|
||||
// get the primary parent-child relationship before it is gone
|
||||
ChildAssociationRef childAssocRef = getPrimaryParent(nodeRef);
|
||||
// get type and aspect QNames as they will be unavailable after the delete
|
||||
|
@@ -63,11 +63,10 @@ public class DbNodeServiceImplTest extends BaseNodeServiceTest
|
||||
private TransactionService txnService;
|
||||
private NodeDaoService nodeDaoService;
|
||||
private DictionaryService dictionaryService;
|
||||
private NodeService mlAwareNodeService;
|
||||
|
||||
protected NodeService getNodeService()
|
||||
{
|
||||
return (NodeService) applicationContext.getBean("NodeService");
|
||||
return (NodeService) applicationContext.getBean("nodeService");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -77,7 +76,6 @@ public class DbNodeServiceImplTest extends BaseNodeServiceTest
|
||||
txnService = (TransactionService) applicationContext.getBean("transactionComponent");
|
||||
nodeDaoService = (NodeDaoService) applicationContext.getBean("nodeDaoService");
|
||||
dictionaryService = (DictionaryService) applicationContext.getBean("dictionaryService");
|
||||
mlAwareNodeService = (NodeService) applicationContext.getBean("mlAwareNodeService");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -323,24 +321,8 @@ public class DbNodeServiceImplTest extends BaseNodeServiceTest
|
||||
BaseNodeServiceTest.PROP_QNAME_ML_TEXT_VALUE,
|
||||
mlTextProperty);
|
||||
|
||||
// Check filterered property retrieval
|
||||
Serializable textValueFiltered = nodeService.getProperty(
|
||||
rootNodeRef,
|
||||
BaseNodeServiceTest.PROP_QNAME_ML_TEXT_VALUE);
|
||||
assertEquals(
|
||||
"Default locale value not taken for ML text",
|
||||
mlTextProperty.getValue(Locale.ENGLISH),
|
||||
textValueFiltered);
|
||||
|
||||
// Check filtered mass property retrieval
|
||||
Map<QName, Serializable> propertiesFiltered = nodeService.getProperties(rootNodeRef);
|
||||
assertEquals(
|
||||
"Default locale value not taken for ML text in Map",
|
||||
mlTextProperty.getValue(Locale.ENGLISH),
|
||||
propertiesFiltered.get(BaseNodeServiceTest.PROP_QNAME_ML_TEXT_VALUE));
|
||||
|
||||
// Check direct property retrieval
|
||||
Serializable textValueDirect = mlAwareNodeService.getProperty(
|
||||
// Check unfiltered property retrieval
|
||||
Serializable textValueDirect = nodeService.getProperty(
|
||||
rootNodeRef,
|
||||
BaseNodeServiceTest.PROP_QNAME_ML_TEXT_VALUE);
|
||||
assertEquals(
|
||||
@@ -348,8 +330,8 @@ public class DbNodeServiceImplTest extends BaseNodeServiceTest
|
||||
mlTextProperty,
|
||||
textValueDirect);
|
||||
|
||||
// Check filtered mass property retrieval
|
||||
Map<QName, Serializable> propertiesDirect = mlAwareNodeService.getProperties(rootNodeRef);
|
||||
// Check unfiltered mass property retrieval
|
||||
Map<QName, Serializable> propertiesDirect = nodeService.getProperties(rootNodeRef);
|
||||
assertEquals(
|
||||
"MLText type not returned direct in Map",
|
||||
mlTextProperty,
|
||||
|
Reference in New Issue
Block a user