Page tree

You are viewing documentation for Structure Server and Data Center version 5.5 and patch releases. For other versions, see Version Index or Structure Cloud.

Skip to end of metadata
Go to start of metadata

You may need to create a new folder and add it to a structure. 

Folders and generators are items that are managed entirely by Structure add-on, so you'll need to use Structure's services to create the item first, giving you the item identify, and then insert a row into a forest.

Read more about Changing Structure Content for general ideas about updating a structure.


1. Create the Folder entity

long folderId = myStructureComponents.getFolderManager().createFolder(Folder.named("My Stuff").build());

The folder is now stored in the database.

2. Define folder's identity

ItemIdentity itemId = CoreIdentities.folder(folderId);

3. Add folder to structure

forestSource.apply(new ForestAction.Add(itemId, 0, 0, 0));
  • No labels