
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2019 06:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2019 12:03 PM
Hi,
You can create folder inside Company Home using repository service.
Ex.
String folderName = String.valueOf(new Date().getTime());
HashMap<QName, Serializable> props = new HashMap<QName, Serializable>();
props.put(ContentModel.PROP_NAME, folderName);nodeService.createNode(repository.getCompanyHome(), ContentModel.ASSOC_CONTAINS, QName.createQName(folderName),
ContentModel.TYPE_FOLDER, props);
Thanks,
Sanjay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2019 12:03 PM
Hi,
You can create folder inside Company Home using repository service.
Ex.
String folderName = String.valueOf(new Date().getTime());
HashMap<QName, Serializable> props = new HashMap<QName, Serializable>();
props.put(ContentModel.PROP_NAME, folderName);nodeService.createNode(repository.getCompanyHome(), ContentModel.ASSOC_CONTAINS, QName.createQName(folderName),
ContentModel.TYPE_FOLDER, props);
Thanks,
Sanjay

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2019 05:23 AM
Hi,
Thanks.
And how can I check a folder existence ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2019 09:22 AM
Hi,
You can use getChildByName() method of NodeService to check that given name folder is exist or not.
Ex.
nodeService.getChildByName(folderNode, ContentModel.ASSOC_CONTAINS,Constants.HELP_DOCUMENTS);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2019 09:31 AM
Thanks.
