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

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

Introduction

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

Prototype

public List<Folder> getMountFolders(long parentFolderId, int start, int end, OrderByComparator<Folder> obc)
            throws PortalException;

Source Link

Usage

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

License:Open Source License

/**
 * Returns an ordered range of all the immediate subfolders of the parent
 * folder that are used for mounting third-party repositories. This method
 * is only supported by the Liferay repository.
 *
 * <p>/*from   ww w .  jav a 2s  . c  o  m*/
 * Useful when paginating results. Returns a maximum of <code>end -
 * start</code> instances. <code>start</code> and <code>end</code> are not
 * primary keys, they are indexes in the result set. Thus, <code>0</code>
 * refers to the first result in the set. Setting both <code>start</code>
 * and <code>end</code> to {@link
 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
 * result set.
 * </p>
 *
 * @param  repositoryId the primary key of the folder's repository
 * @param  parentFolderId the primary key of the folder's parent folder
 * @param  start the lower bound of the range of results
 * @param  end the upper bound of the range of results (not inclusive)
 * @param  obc the comparator to order the folders (optionally
 *         <code>null</code>)
 * @return the range of immediate subfolders of the parent folder that are
 *         used for mounting third-party repositories ordered by comparator
 *         <code>obc</code>
 * @throws PortalException if the repository or parent folder could not be
 *         found
 * @throws SystemException if a system exception occurred
 */
public List<Folder> getMountFolders(long repositoryId, long parentFolderId, int start, int end,
        OrderByComparator obc) throws PortalException, SystemException {

    Repository repository = getRepository(repositoryId);

    return repository.getMountFolders(parentFolderId, start, end, obc);
}