mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
78372: Merged V4.2-BUG-FIX (4.2.3) to HEAD-BUG-FIX (5.0) 76636 : Merged DEV to V4.2-BUG-FIX (4.2.3) 76604 : MNT-11876 : CMIS extension data is not returned in 1.1 atom binding - Return aspects and aspect properties in extension data. Test for the fix git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@82533 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1568,18 +1568,14 @@ public class CMISConnector implements ApplicationContextAware, ApplicationListen
|
||||
});
|
||||
}
|
||||
|
||||
CmisVersion cmisVersion = getRequestCmisVersion();
|
||||
if(cmisVersion.equals(CmisVersion.CMIS_1_0))
|
||||
// add aspects
|
||||
List<CmisExtensionElement> extensions = getAspectExtensions(info, filter, result.getProperties()
|
||||
.getProperties().keySet());
|
||||
if (!extensions.isEmpty())
|
||||
{
|
||||
// add aspects (cmis 1.0)
|
||||
List<CmisExtensionElement> extensions = getAspectExtensions(info, filter, result.getProperties()
|
||||
.getProperties().keySet());
|
||||
if (!extensions.isEmpty())
|
||||
{
|
||||
result.getProperties().setExtensions(
|
||||
Collections.singletonList((CmisExtensionElement) new CmisExtensionElementImpl(
|
||||
ALFRESCO_EXTENSION_NAMESPACE, ASPECTS, null, extensions)));
|
||||
}
|
||||
result.getProperties().setExtensions(
|
||||
Collections.singletonList((CmisExtensionElement) new CmisExtensionElementImpl(
|
||||
ALFRESCO_EXTENSION_NAMESPACE, ASPECTS, null, extensions)));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
@@ -1983,13 +1979,18 @@ public class CMISConnector implements ApplicationContextAware, ApplicationListen
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
AspectDefinition aspectDefinition = dictionaryService.getAspect(aspect);
|
||||
Map<QName, org.alfresco.service.cmr.dictionary.PropertyDefinition> aspectProperties = aspectDefinition.getProperties();
|
||||
|
||||
extensions.add(new CmisExtensionElementImpl(ALFRESCO_EXTENSION_NAMESPACE, APPLIED_ASPECTS, null, aspectType
|
||||
.getTypeId()));
|
||||
|
||||
for (PropertyDefinitionWrapper propDef : aspectType.getProperties())
|
||||
{
|
||||
if (propertyIds.contains(propDef.getPropertyId()))
|
||||
boolean addPropertyToExtensionList = getRequestCmisVersion().equals(CmisVersion.CMIS_1_1) && aspectProperties.keySet().contains(propDef.getAlfrescoName());
|
||||
// MNT-11876 : add property to extension even if it has been returned (CMIS 1.1)
|
||||
if (propertyIds.contains(propDef.getPropertyId()) && !addPropertyToExtensionList)
|
||||
{
|
||||
// skip properties that have already been added
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user