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

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

Introduction

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

Prototype

public int getMountFoldersCount(long parentFolderId) 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 that are
 * used for mounting third-party repositories. This method is only supported
 * by the Liferay repository./*from  www .j  a va 2 s  .c  o m*/
 *
 * @param  repositoryId the primary key of the repository
 * @param  parentFolderId the primary key of the parent folder
 * @return the number of folders of the parent folder that are used for
 *         mounting third-party repositories
 * @throws PortalException if the repository or parent folder could not be
 *         found
 * @throws SystemException if a system exception occurred
 */
public int getMountFoldersCount(long repositoryId, long parentFolderId)
        throws PortalException, SystemException {

    Repository repository = getRepository(repositoryId);

    return repository.getMountFoldersCount(parentFolderId);
}