How to Create a Folder in CMS using BO Java SDK

public static void createFolder(
	IInfoStore infoStore,
	String name,
	String description,
	String parentCUID)
		throws SDKException
{
	IPluginMgr pluginMgr = infoStore.getPluginMgr();
	IPluginInfo plugin = pluginMgr.getPluginInfo(CeKind.FOLDER);
	IInfoObjects newInfoObjects = infoStore.newInfoObjectCollection();
	newInfoObjects.add(plugin);
	IInfoObject infoObject = (IInfoObject)newInfoObjects.get(0);
	infoObject.setTitle(name);
	infoObject.setDescription(description);
	infoObject.properties().setProperty(CePropertyID.SI_PARENT_CUID, parentCUID);
	infoStore.commit(newInfoObjects);
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s