You are here
Getting the contents of a folder
As its name implies, FolderGetContents is used to get the child Folder and Document objects from a parent folder. It is often used in building a custom UI into the SpringCM folder tree as well as used in batch document processing.
- token – Authentication token used in all SOAP calls
- folderId – This is the Id of the SpringCM folder of who’s contents is to be retrieved.
- loadExtendedMetadata – Whether metadata on the folder or document is loaded, it should generally return false if the metadata is not needed for performance reasons.
- pager – This is an SCMDocumentPager and it cannot be null, it must be created and passed in by the client. The SortColumn and SortAscending properties allow the developer to specify how the results will be ordered when they are returned. The StartIndex and PageSize are used to bring back subsets of the folder contents and allow the client to build paging controls. The max PageSize recommended is 100. For example if there 300 documents in the folder specified in the folderId parameter, then all of the documents could be retrieved with 3 calls that specify the page size of 100 for each one, and then specifying 0, 100, and 200 as the 3 StartIndex’s.
The return object from this call is an SCMList. This object has 3 properties: an array of SCMDocuments that are in the folder, an array of SCMFolders that are sub-folders of the folder passed in the folderId parameter, and the TotalRowCount, which can be used in conjunction with the SCMDocumentPager to build paging controls or to loop and pull all items from the folder when there are more than 100 items in it.