mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.0 to HEAD
5457: Merge error on copy web project action 5459: AR-1278 5461: 5462: A few deployment fixes 5469: Dictionary messages 5470: L2 cache checks 5478: WCM-374 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5485 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -314,8 +314,15 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
||||
// create the node instance
|
||||
Node childNode = nodeDaoService.newNode(store, newId, nodeTypeQName);
|
||||
|
||||
// get the parent node
|
||||
// Get the parent node
|
||||
Node parentNode = getNodeNotNull(parentRef);
|
||||
// Create the association
|
||||
ChildAssoc childAssoc = nodeDaoService.newChildAssoc(
|
||||
parentNode,
|
||||
childNode,
|
||||
true,
|
||||
assocTypeQName,
|
||||
assocQName);
|
||||
|
||||
// Set the default property values
|
||||
addDefaultPropertyValues(nodeTypeDef, properties);
|
||||
@@ -331,13 +338,7 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
||||
propertiesAfter = setPropertiesImpl(childNode, properties);
|
||||
}
|
||||
|
||||
// create the association
|
||||
ChildAssoc childAssoc = nodeDaoService.newChildAssoc(
|
||||
parentNode,
|
||||
childNode,
|
||||
true,
|
||||
assocTypeQName,
|
||||
assocQName);
|
||||
// Ensure child uniqueness
|
||||
setChildUniqueName(childNode); // ensure uniqueness
|
||||
ChildAssociationRef childAssocRef = childAssoc.getChildAssocRef();
|
||||
|
||||
@@ -1069,7 +1070,7 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
||||
{
|
||||
Node node = getNodeNotNull(nodeRef);
|
||||
// get the assocs pointing to it
|
||||
Collection<ChildAssoc> parentAssocs = node.getParentAssocs();
|
||||
Collection<ChildAssoc> parentAssocs = nodeDaoService.getParentAssocs(node);
|
||||
// list of results
|
||||
Collection<NodeRef> results = new ArrayList<NodeRef>(parentAssocs.size());
|
||||
for (ChildAssoc assoc : parentAssocs)
|
||||
@@ -1089,7 +1090,7 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
||||
{
|
||||
Node node = getNodeNotNull(nodeRef);
|
||||
// get the assocs pointing to it
|
||||
Collection<ChildAssoc> parentAssocs = node.getParentAssocs();
|
||||
Collection<ChildAssoc> parentAssocs = nodeDaoService.getParentAssocs(node);
|
||||
// shortcut if there are no assocs
|
||||
if (parentAssocs.size() == 0)
|
||||
{
|
||||
@@ -1319,7 +1320,7 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
||||
{
|
||||
NodeRef currentNodeRef = currentNode.getNodeRef();
|
||||
// get the parent associations of the given node
|
||||
Collection<ChildAssoc> parentAssocs = currentNode.getParentAssocs();
|
||||
Collection<ChildAssoc> parentAssocs = nodeDaoService.getParentAssocs(currentNode);
|
||||
// does the node have parents
|
||||
boolean hasParents = parentAssocs.size() > 0;
|
||||
// does the current node have a root aspect?
|
||||
@@ -1651,7 +1652,7 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
||||
}
|
||||
// parent associations
|
||||
ArrayList<ChildAssociationRef> archivedParentAssocRefs = new ArrayList<ChildAssociationRef>(5);
|
||||
for (ChildAssoc assoc : node.getParentAssocs())
|
||||
for (ChildAssoc assoc : nodeDaoService.getParentAssocs(node))
|
||||
{
|
||||
Long relatedNodeId = assoc.getParent().getId();
|
||||
if (nodeStatusesById.containsKey(relatedNodeId))
|
||||
@@ -1952,7 +1953,7 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
||||
useName = (String) nameValue.getValue(DataTypeDefinition.TEXT);
|
||||
}
|
||||
// get all the parent assocs
|
||||
Collection<ChildAssoc> parentAssocs = childNode.getParentAssocs();
|
||||
Collection<ChildAssoc> parentAssocs = nodeDaoService.getParentAssocs(childNode);
|
||||
for (ChildAssoc assoc : parentAssocs)
|
||||
{
|
||||
QName assocTypeQName = assoc.getTypeQName();
|
||||
|
Reference in New Issue
Block a user