Merged HEAD-BUG-FIX (Cloud33/4.3) to HEAD (Cloud33/4.3)

62917: Merged PLATFORM1 (Cloud33) to HEAD-BUG-FIX (Cloud33/4.3)
      62451: ACE-33 - CMIS item support.   CRUD of cmis items, cmis item shown as children of folders.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@62971 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-02-20 14:35:00 +00:00
parent 50f699b961
commit 2e25d15ed1
4 changed files with 1700 additions and 1638 deletions

View File

@@ -58,6 +58,8 @@ import org.alfresco.opencmis.dictionary.CMISNodeInfo;
import org.alfresco.opencmis.dictionary.CMISObjectVariant;
import org.alfresco.opencmis.dictionary.CMISPropertyAccessor;
import org.alfresco.opencmis.dictionary.DocumentTypeDefinitionWrapper;
import org.alfresco.opencmis.dictionary.FolderTypeDefintionWrapper;
import org.alfresco.opencmis.dictionary.ItemTypeDefinitionWrapper;
import org.alfresco.opencmis.dictionary.PropertyDefinitionWrapper;
import org.alfresco.opencmis.dictionary.TypeDefinitionWrapper;
import org.alfresco.opencmis.mapping.DirectProperty;
@@ -1262,15 +1264,15 @@ public class CMISConnector implements ApplicationContextAware, ApplicationListen
*/
public String createObjectId(NodeRef currentVersionNodeRef)
{
FileInfo fileInfo = getFileFolderService().getFileInfo(currentVersionNodeRef);
if(fileInfo == null)
QName typeQName = nodeService.getType(currentVersionNodeRef);
TypeDefinitionWrapper type = getOpenCMISDictionaryService().findNodeType(typeQName);
if(type instanceof ItemTypeDefinitionWrapper)
{
// not a file or a folder
return constructObjectId(currentVersionNodeRef, null);
}
if(fileInfo.isFolder())
if(type instanceof FolderTypeDefintionWrapper)
{
return constructObjectId(currentVersionNodeRef, null);
}