mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fix for now-missing children of versioned parents
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4766 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -422,25 +422,28 @@ public class NodeServiceImpl implements NodeService, VersionModel
|
|||||||
NodeRef childRef = childAssocRef.getChildRef();
|
NodeRef childRef = childAssocRef.getChildRef();
|
||||||
NodeRef referencedNode = (NodeRef)this.dbNodeService.getProperty(childRef, ContentModel.PROP_REFERENCE);
|
NodeRef referencedNode = (NodeRef)this.dbNodeService.getProperty(childRef, ContentModel.PROP_REFERENCE);
|
||||||
|
|
||||||
// get the qualified name of the frozen child association and filter out unwanted names
|
if (this.dbNodeService.exists(referencedNode) == true)
|
||||||
QName qName = (QName)this.dbNodeService.getProperty(childRef, PROP_QNAME_ASSOC_QNAME);
|
{
|
||||||
|
// get the qualified name of the frozen child association and filter out unwanted names
|
||||||
if (qnamePattern.isMatch(qName) == true)
|
QName qName = (QName)this.dbNodeService.getProperty(childRef, PROP_QNAME_ASSOC_QNAME);
|
||||||
{
|
|
||||||
// Retrieve the isPrimary and nthSibling values of the forzen child association
|
|
||||||
QName assocType = (QName)this.dbNodeService.getProperty(childRef, PROP_QNAME_ASSOC_TYPE_QNAME);
|
|
||||||
boolean isPrimary = ((Boolean)this.dbNodeService.getProperty(childRef, PROP_QNAME_IS_PRIMARY)).booleanValue();
|
|
||||||
int nthSibling = ((Integer)this.dbNodeService.getProperty(childRef, PROP_QNAME_NTH_SIBLING)).intValue();
|
|
||||||
|
|
||||||
// Build a child assoc ref to add to the returned list
|
if (qnamePattern.isMatch(qName) == true)
|
||||||
ChildAssociationRef newChildAssocRef = new ChildAssociationRef(
|
{
|
||||||
assocType,
|
// Retrieve the isPrimary and nthSibling values of the forzen child association
|
||||||
nodeRef,
|
QName assocType = (QName)this.dbNodeService.getProperty(childRef, PROP_QNAME_ASSOC_TYPE_QNAME);
|
||||||
qName,
|
boolean isPrimary = ((Boolean)this.dbNodeService.getProperty(childRef, PROP_QNAME_IS_PRIMARY)).booleanValue();
|
||||||
referencedNode,
|
int nthSibling = ((Integer)this.dbNodeService.getProperty(childRef, PROP_QNAME_NTH_SIBLING)).intValue();
|
||||||
isPrimary,
|
|
||||||
nthSibling);
|
// Build a child assoc ref to add to the returned list
|
||||||
result.add(newChildAssocRef);
|
ChildAssociationRef newChildAssocRef = new ChildAssociationRef(
|
||||||
|
assocType,
|
||||||
|
nodeRef,
|
||||||
|
qName,
|
||||||
|
referencedNode,
|
||||||
|
isPrimary,
|
||||||
|
nthSibling);
|
||||||
|
result.add(newChildAssocRef);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -506,13 +509,16 @@ public class NodeServiceImpl implements NodeService, VersionModel
|
|||||||
NodeRef childRef = childAssocRef.getChildRef();
|
NodeRef childRef = childAssocRef.getChildRef();
|
||||||
NodeRef referencedNode = (NodeRef)this.dbNodeService.getProperty(childRef, ContentModel.PROP_REFERENCE);
|
NodeRef referencedNode = (NodeRef)this.dbNodeService.getProperty(childRef, ContentModel.PROP_REFERENCE);
|
||||||
|
|
||||||
// get the qualified type name of the frozen child association and filter out unwanted names
|
if (this.dbNodeService.exists(referencedNode) == true)
|
||||||
QName qName = (QName)this.dbNodeService.getProperty(childRef, PROP_QNAME_ASSOC_TYPE_QNAME);
|
{
|
||||||
|
// get the qualified type name of the frozen child association and filter out unwanted names
|
||||||
if (qnamePattern.isMatch(qName) == true)
|
QName qName = (QName)this.dbNodeService.getProperty(childRef, PROP_QNAME_ASSOC_TYPE_QNAME);
|
||||||
{
|
|
||||||
AssociationRef newAssocRef = new AssociationRef(sourceRef, qName, referencedNode);
|
if (qnamePattern.isMatch(qName) == true)
|
||||||
result.add(newAssocRef);
|
{
|
||||||
|
AssociationRef newAssocRef = new AssociationRef(sourceRef, qName, referencedNode);
|
||||||
|
result.add(newAssocRef);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user