X

Subscribe to BloggerHow updates..

Recommend us on Google+

Get updates in your mail

New posts will get delivered to your mail box directly.Its free and we never spam you. Enter your mail here and click on subscribe. Check your mail box for a confirmation mail.

Get updates in your RSS reader

Subscribe using RSS and read updates using your favorite RSS reader..
RSS

Like us on Facebook

Get updates directly on your Facebook wall.

Follow us on Twitter

Get updates as tweets..

Circle me on Google plus

Add me to your circle and get new post updates in Google plus stream.

long folderId = 0;
try {
ThemeDisplay themeDisplay = (ThemeDisplay) request
.getAttribute(WebKeys.THEME_DISPLAY);
ServiceContext serviceContext = new ServiceContext();
serviceContext.setScopeGroupId(themeDisplay.getScopeGroupId());
                       //To get the List of folders of an Organization
List<DLFolder> groupFolder = DLFolderLocalServiceUtil.getFolders(
themeDisplay.getScopeGroupId(),
DLFolderConstants.DEFAULT_PARENT_FOLDER_ID);
   //To create a folder in an Organization
DLFolder folder = DLFolderLocalServiceUtil.addFolder(
themeDisplay.getUserId(),
themeDisplay.getScopeGroupId(),
DLFolderConstants.DEFAULT_PARENT_FOLDER_ID,
"Folder Name", "Folder Description",
serviceContext);

}

} catch (SystemException e) {
e.printStackTrace();
} catch (PortalException e) {
e.printStackTrace();
}
Share article
Older Post Newer Post

0 comments:

Post a Comment

To Top