List of usage examples for com.liferay.portal.kernel.repository Repository getRepositoryFileEntries
public List<FileEntry> getRepositoryFileEntries(long userId, long rootFolderId, int start, int end, OrderByComparator<FileEntry> obc) throws PortalException;
From source file:com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl.java
License:Open Source License
/** * Returns an ordered range of all the file entries in the group starting at * the root folder that are stored within the Liferay repository. This * method is primarily used to search for recently modified file entries. It * can be limited to the file entries modified by a given user. * * <p>//w w w . jav a 2 s . co 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 groupId the primary key of the group * @param userId the primary key of the user who created the file * (optionally <code>0</code>) * @param rootFolderId the primary key of the root folder to begin the * search * @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 file entries (optionally * <code>null</code>) * @return the range of matching file entries ordered by comparator * <code>obc</code> * @throws PortalException if the group could not be found * @throws SystemException if a system exception occurred */ public List<FileEntry> getGroupFileEntries(long groupId, long userId, long rootFolderId, int start, int end, OrderByComparator obc) throws PortalException, SystemException { Repository repository = getRepository(groupId); return repository.getRepositoryFileEntries(userId, rootFolderId, start, end, obc); }