Example usage for com.liferay.portal.sharepoint SharepointUtil getPathArray

List of usage examples for com.liferay.portal.sharepoint SharepointUtil getPathArray

Introduction

In this page you can find the example usage for com.liferay.portal.sharepoint SharepointUtil getPathArray.

Prototype

public static String[] getPathArray(String path) 

Source Link

Usage

From source file:com.liferay.portlet.documentlibrary.sharepoint.DLSharepointStorageImpl.java

License:Open Source License

@Override
public void getParentFolderIds(long groupId, String path, List<Long> folderIds) throws Exception {

    String[] pathArray = SharepointUtil.getPathArray(path);

    if (pathArray.length == 0) {
        return;//  w  w w.  j av a 2  s . c o  m
    }

    long parentFolderId = folderIds.get(folderIds.size() - 1);
    Folder folder = DLAppServiceUtil.getFolder(groupId, parentFolderId, pathArray[0]);

    folderIds.add(folder.getFolderId());

    if (pathArray.length > 1) {
        path = removeFoldersFromPath(path, 1);

        getParentFolderIds(groupId, path, folderIds);
    }
}