Highlighted

How to get the content of a given space?

_Michael_Feicht

05-12-2008

Hi Everybody,



I'm wondering how to retrieve the content of a particular space. There is no activity/operation for that purpose.



I analyzed the ContentService in Detail and found out, that there is a non-orchestrateable getSpaceContents() method. I've modified the component.xml to make this method public and installed the new component. Unfortunately the method always returns an empty list.



So how what can I do, to get a list files inside a given space.



kind regards

Michael

Replies

Highlighted

Avatar

Guest

01-04-2009

a)Create a new LC orchestration

b)Use getAssociated operation with space path as the path of space, and association type as contains (use full name - "{http://www.alfresco.org/model/content/1.0}contains" )

c)Store the output in a list variable - it will contain the list of content elements' ID strings

d)Iterate through the list elements and use retrieveContent API to get the documents from node IDs



Future release will expose a new method for this purpose. Please don't use existing getSpaceContents method as it is for internal use only.