Folder Collection

A folder collection extends Collection and adds additional behaviors specific to folder collections. It's used only for the ChildFolders property in Folder and not for any other folder collections, as this collection copies fields from the parent folder to the children.

public class CdmFolderCollection extends CdmCollection<CdmFolderDefinition>

Constructors

Name Description
CdmFolderCollection(CdmCorpusContext, CdmFolderDefinition)
ctx: The corpus context.
parentFolder: The folder that contains this collection. Must be the parent folder.
Initializes a new instance of the CdmFolderCollection class.

Methods

Name Description Return Type
Add(CdmFolderDefinition)
childFolder: The folder to add to the collection.

append(...) in Python, push(...) in TypeScript.
Adds the specified child folder to the collection. Returns the folder that was added to the collection. CdmFolderDefinition
Add(string, bool)
name: The name of the folder to add to the collection.
simpleRef [optional]: This parameter is unused. It's kept just for consistency with other Common Data Model collections.

append(...) in Python, push(...) in TypeScript.
Creates a folder with the specified name and adds it to the collection. Returns the folder that was added to the collection. CdmFolderDefinition
AddRange(IEnumerable<CdmFolderDefinition>)
childFolderList: The list of folders to add.

addAll(...) in Java, extend(...) in Python, concat(...) in TypeScript.
Adds the elements of the specified list of folders to the collection. void
Insert(int, CdmFolderDefinition)
index: The index to insert the folder at.
childFolder: The folder to add to the collection.

add(...) in Java.
Inserts the folder into the collection at the specified index. void