Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How to get the content of a given space?

_Michael_Feicht
Level 3
Level 3
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
1 Reply
Not applicable
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.