Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (4.3/Cloud)

74567: Merged DEV to HEAD-BUG-FIX (5.0)
      69634 : MNT-11339 : Unable to create relationship between cmis:document and cmis:item 
         - TYPE_BASE is valid CMIS type 
      73710 : MNT-11339 : Unable to create relationship between cmis:document and cmis:item
         - Create association between cmis:document and cmis:item test


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@74915 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Will Abson
2014-06-25 16:38:52 +00:00
parent cd73ccac47
commit 95ef8e44c7
4 changed files with 173 additions and 4 deletions

View File

@@ -1306,9 +1306,9 @@ public class AlfrescoCmisServiceImpl extends AbstractCmisService implements Alfr
String sourceId = connector.getSourceIdProperty(properties);
CMISNodeInfo sourceInfo = getOrCreateNodeInfo(sourceId, "Source");
if (!sourceInfo.isVariant(CMISObjectVariant.CURRENT_VERSION) && !sourceInfo.isVariant(CMISObjectVariant.FOLDER))
if (!sourceInfo.isVariant(CMISObjectVariant.CURRENT_VERSION) && !sourceInfo.isVariant(CMISObjectVariant.FOLDER) && !sourceInfo.isVariant(CMISObjectVariant.ITEM))
{
throw new CmisInvalidArgumentException("Source is not the latest version of a document or a folder object!");
throw new CmisInvalidArgumentException("Source is not the latest version of a document, a folder or an item object!");
}
final NodeRef sourceNodeRef = sourceInfo.getNodeRef();
@@ -1317,10 +1317,10 @@ public class AlfrescoCmisServiceImpl extends AbstractCmisService implements Alfr
String targetId = connector.getTargetIdProperty(properties);
CMISNodeInfo targetInfo = getOrCreateNodeInfo(targetId, "Target");
if (!targetInfo.isVariant(CMISObjectVariant.CURRENT_VERSION) && !targetInfo.isVariant(CMISObjectVariant.FOLDER))
if (!targetInfo.isVariant(CMISObjectVariant.CURRENT_VERSION) && !targetInfo.isVariant(CMISObjectVariant.FOLDER) && !targetInfo.isVariant(CMISObjectVariant.ITEM))
{
throw new CmisInvalidArgumentException(
"Target is not the latest version of a document or a folder object!!");
"Target is not the latest version of a document, a folder or an item object!!");
}
final NodeRef targetNodeRef = targetInfo.getNodeRef();