Example usage for com.liferay.portal.kernel.repository DocumentRepository getFolders

List of usage examples for com.liferay.portal.kernel.repository DocumentRepository getFolders

Introduction

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

Prototype

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

Source Link

Usage

From source file:com.liferay.document.library.internal.trash.DLBaseTrashHandler.java

License:Open Source License

@Override
public List<ContainerModel> getContainerModels(long classPK, long parentContainerModelId, int start, int end)
        throws PortalException {

    DocumentRepository documentRepository = getDocumentRepository(classPK);

    List<Folder> folders = documentRepository.getFolders(parentContainerModelId, false, start, end, null);

    List<ContainerModel> containerModels = new ArrayList<>(folders.size());

    for (Folder folder : folders) {
        containerModels.add((ContainerModel) folder.getModel());
    }//from w  w w .j  a  va2s . c om

    return containerModels;
}