Show/Hide Toolbars

Performs one of the following:

Gets child documents (files) for a given document folder.

Gets previous versions of a document (files) for a given document file.

For both operations, documents are returned with only specified property values. For a list of available properties, see the type class, Document.

Code Snippet

private List<String> getPropertiesToRead() {

List<String> props = new List<String>();

//the list of all available properties displays below but to increase efficiency in your searches, you can omit unnecessary properties from your application and those values will not be returned

props.add("version");

props.add("subject");

props.add("categories");

props.add("createdOn");

props.add("createdBy");

props.add("modifiedBy");

props.add("modifiedOn");

props.add("name");

props.add("author");

props.add("authorDate");

props.add("size");

//the contentType is only relevant to a document of type FILE

props.add("contentType");

//the contentType is only relevant to a document of type FILE

props.add("content");

props.add("type");

props.add("parentFolder");

props.add("checkedOutBy");

props.add("checkedOutOn");

props.add("checkedInBy");

props.add("checkedInOn");

props.add("versionText");

//the url is only relevant to a document of type HYPERLINK

props.add("url");

//the contentType is only relevant to a document of type SHORTCUT

props.add("shortcutToDocument");

return props;

}

private Document readChildDocument() throws Exception {

//the first parameter, parentUniqueKey, identifies the unique key of the parent folder whose child documents' properties to return; where child documents would include files, subfolders, hyperlinks, and shortcuts included in the parent folder recursively

List<Document> readChildDocument = documentRepository.readChildDocuments("DOCU_2534",

getPropertiesToRead());

return readChildDocument;

}