Example usage for com.liferay.portal.kernel.repository.capabilities TrashCapability restoreFolderFromTrash

List of usage examples for com.liferay.portal.kernel.repository.capabilities TrashCapability restoreFolderFromTrash

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.repository.capabilities TrashCapability restoreFolderFromTrash.

Prototype

public void restoreFolderFromTrash(long userId, Folder folder) throws PortalException;

Source Link

Usage

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

License:Open Source License

@Override
public void restoreTrashEntry(long userId, long classPK) throws PortalException {

    DocumentRepository documentRepository = getDocumentRepository(classPK);

    TrashCapability trashCapability = documentRepository.getCapability(TrashCapability.class);

    Folder folder = documentRepository.getFolder(classPK);

    trashCapability.restoreFolderFromTrash(userId, folder);
}