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

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

Introduction

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

Prototype

public void restoreFileShortcutFromTrash(long userId, FileShortcut fileShortcut) throws PortalException;

Source Link

Usage

From source file:com.liferay.document.library.internal.trash.DLFileShortcutTrashHandler.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);

    FileShortcut fileShortcut = documentRepository.getFileShortcut(classPK);

    trashCapability.restoreFileShortcutFromTrash(userId, fileShortcut);
}