mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merge from SEAMIST3
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10730 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -28,6 +28,7 @@ import java.io.Serializable;
|
||||
|
||||
import org.alfresco.cmis.dictionary.CMISMapping;
|
||||
import org.alfresco.cmis.dictionary.CMISScope;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
||||
/**
|
||||
@@ -41,7 +42,15 @@ public class ParentPropertyAccessor extends AbstractNamedPropertyAccessor
|
||||
|
||||
public Serializable getProperty(NodeRef nodeRef)
|
||||
{
|
||||
return getServiceRegistry().getNodeService().getPrimaryParent(nodeRef).getParentRef();
|
||||
ChildAssociationRef car = getServiceRegistry().getNodeService().getPrimaryParent(nodeRef);
|
||||
if((car != null) && (car.getParentRef() != null))
|
||||
{
|
||||
return car.getParentRef().toString();
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user