Example usage for com.liferay.portal.kernel.repository Repository getFoldersCount

List of usage examples for com.liferay.portal.kernel.repository Repository getFoldersCount

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.repository Repository getFoldersCount.

Prototype

public int getFoldersCount(long parentFolderId, boolean includeMountfolders) throws PortalException;

Source Link

Usage

From source file:com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl.java

License:Open Source License

/**
 * Returns the number of immediate subfolders of the parent folder,
 * optionally including mount folders for third-party repositories.
 *
 * @param  repositoryId the primary key of the folder's repository
 * @param  parentFolderId the primary key of the folder's parent folder
 * @param  includeMountFolders whether to include mount folders for
 *         third-party repositories/*from w ww .ja v a2  s  .  co  m*/
 * @return the number of immediate subfolders of the parent folder
 * @throws PortalException if the parent folder could not be found
 * @throws SystemException if a system exception occurred
 */
public int getFoldersCount(long repositoryId, long parentFolderId, boolean includeMountFolders)
        throws PortalException, SystemException {

    Repository repository = getRepository(repositoryId);

    return repository.getFoldersCount(parentFolderId, includeMountFolders);
}