List of usage examples for com.liferay.portal.kernel.webdav WebDAVUtil getGroupId
public static long getGroupId(long companyId, String[] pathArray) throws WebDAVException
From source file:com.liferay.portlet.documentlibrary.webdav.DLWebDAVStorageImpl.java
License:Open Source License
protected long getFolderId(long companyId, String[] pathArray, boolean parent) throws Exception { long folderId = DLFolderConstants.DEFAULT_PARENT_FOLDER_ID; if (pathArray.length <= 1) { return folderId; } else {/*from w ww . j a v a2 s . com*/ long groupId = WebDAVUtil.getGroupId(companyId, pathArray); int x = pathArray.length; if (parent) { x--; } for (int i = 2; i < x; i++) { String name = pathArray[i]; Folder folder = DLAppServiceUtil.getFolder(groupId, folderId, name); if (groupId == folder.getRepositoryId()) { folderId = folder.getFolderId(); } } } return folderId; }