1

I have an Alfresco 4.2 document at /Sites/swsdp/documentLibrary/Presentations/test1.txt with id workspace://SpacesStore/626216a1-5f9e-4010-a424-e2e0ec4f2663;1.0.

Here is my DotCMIS code to deal with a ChangeLog change event:

ICmisObject cmisObject = session.GetObject(
    "workspace://SpacesStore/626216a1-5f9e-4010-a424-e2e0ec4f2663;1.0");

if (null != (document = cmisObject as IDocument))
{
    String filename = document.ContentStreamFilename; // returns: "test1.txt"
    List<String> paths = document.Paths;              // returns: Empty list
}

Why is paths an empty list?
Why does it not contain /Sites/swsdp/documentLibrary/Presentations/test1.txt?

I know it is not exactly the same, but OpenCMIS documentation says this for the same method:

Returns the list of paths of this object or an empty list if this object is unfiled or if this object is the root folder

Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373

2 Answers2

1

The problem is that I was using the old CMIS URL of Alfresco.

It is solved by using the new URL format:

http://<host>/alfresco/api/-default-/public/cmis/versions/1.0/atom
Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373
0

This isn't an answer but I can't add a comment since my rep is too low.

It works for me. I got a document's path using an Alfresco 4.2 system

btw, your code should be

String filename = document.ContentStreamFileName;  //camel case
IList<String> paths = document.Paths;  //IList vs List
Nic
  • 151
  • 1
  • 2
  • 9