List of usage examples for com.liferay.portal.kernel.repository.capabilities TrashCapability moveFileShortcutFromTrash
public FileShortcut moveFileShortcutFromTrash(long userId, FileShortcut fileShortcut, Folder newFolder, ServiceContext serviceContext) throws PortalException;
From source file:com.liferay.document.library.internal.trash.DLFileShortcutTrashHandler.java
License:Open Source License
@Override public void moveTrashEntry(long userId, long classPK, long containerModelId, ServiceContext serviceContext) throws PortalException { DocumentRepository documentRepository = getDocumentRepository(classPK); TrashCapability trashCapability = documentRepository.getCapability(TrashCapability.class); Folder newFolder = null;/*from w w w.ja va 2s .com*/ if (containerModelId != DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) { newFolder = documentRepository.getFolder(containerModelId); } FileShortcut fileShortcut = documentRepository.getFileShortcut(classPK); trashCapability.moveFileShortcutFromTrash(userId, fileShortcut, newFolder, serviceContext); }