1 Reply Latest reply on Apr 1, 2009 4:21 AM by (Kapil_Malik)

    How to get the content of a given space?

    (Michael_Feichtegger) Level 1
      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. Re: How to get the content of a given space?
          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.