mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-15 15:02:20 +00:00
Merged 5.1.N (5.1.1) to HEAD (5.1)
121800 rneamtu: Merged 5.0.N (5.0.4) to 5.1.N (5.1.1) 121772 amorarasu: Merged DEV to 5.0.N (5.0.4) 120891 121263 amorarasu: MNT-14951: Using CMIS it is not possible to retrieve the secondary or the list of the parents of a folder - Changed getObjectParents() to return all the parents, not just the first one. - Added junit test. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@123653 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2015 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2016 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -848,27 +848,30 @@ public class AlfrescoCmisServiceImpl extends AbstractCmisService implements Alfr
|
||||
List<CMISNodeInfo> parentInfos = info.getParents();
|
||||
if (!parentInfos.isEmpty())
|
||||
{
|
||||
CMISNodeInfo parentInfo = addNodeInfo(parentInfos.get(0));
|
||||
|
||||
ObjectData object = connector.createCMISObject(
|
||||
parentInfo, filter, includeAllowableActions,
|
||||
includeRelationships, renditionFilter, false, false);
|
||||
boolean isObjectInfoRequired = getContext().isObjectInfoRequired();
|
||||
if (isObjectInfoRequired)
|
||||
for (CMISNodeInfo parent : parentInfos)
|
||||
{
|
||||
getObjectInfo(repositoryId, object.getId(), includeRelationships);
|
||||
CMISNodeInfo parentInfo = addNodeInfo(parent);
|
||||
|
||||
ObjectData object = connector.createCMISObject(
|
||||
parentInfo, filter, includeAllowableActions,
|
||||
includeRelationships, renditionFilter, false, false);
|
||||
boolean isObjectInfoRequired = getContext().isObjectInfoRequired();
|
||||
if (isObjectInfoRequired)
|
||||
{
|
||||
getObjectInfo(repositoryId, object.getId(), includeRelationships);
|
||||
}
|
||||
|
||||
ObjectParentDataImpl objectParent = new ObjectParentDataImpl();
|
||||
objectParent.setObject(object);
|
||||
|
||||
// include relative path segment
|
||||
if (includeRelativePathSegment)
|
||||
{
|
||||
objectParent.setRelativePathSegment(info.getName());
|
||||
}
|
||||
|
||||
result.add(objectParent);
|
||||
}
|
||||
|
||||
ObjectParentDataImpl objectParent = new ObjectParentDataImpl();
|
||||
objectParent.setObject(object);
|
||||
|
||||
// include relative path segment
|
||||
if (includeRelativePathSegment)
|
||||
{
|
||||
objectParent.setRelativePathSegment(info.getName());
|
||||
}
|
||||
|
||||
result.add(objectParent);
|
||||
}
|
||||
}
|
||||
else if (info.isCurrentVersion() || info.isPWC())
|
||||
|
Reference in New Issue
Block a user