001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.repository.capabilities;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.repository.model.FileEntry;
019    import com.liferay.portal.kernel.repository.model.Folder;
020    import com.liferay.portal.service.ServiceContext;
021    
022    /**
023     * @author Adolfo P??rez
024     */
025    public interface TrashCapability extends Capability {
026    
027            public void deleteFileEntry(FileEntry fileEntry) throws PortalException;
028    
029            public void deleteFolder(Folder folder) throws PortalException;
030    
031            public boolean isInTrash(Folder folder) throws PortalException;
032    
033            public FileEntry moveFileEntryFromTrash(
034                            long userId, FileEntry fileEntry, Folder newFolder,
035                            ServiceContext serviceContext)
036                    throws PortalException;
037    
038            public FileEntry moveFileEntryToTrash(long userId, FileEntry fileEntry)
039                    throws PortalException;
040    
041            public Folder moveFolderFromTrash(
042                            long userId, Folder folder, Folder destinationFolder,
043                            ServiceContext serviceContext)
044                    throws PortalException;
045    
046            public Folder moveFolderToTrash(long userId, Folder folder)
047                    throws PortalException;
048    
049            public void restoreFileEntryFromTrash(long userId, FileEntry fileEntry)
050                    throws PortalException;
051    
052            public void restoreFolderFromTrash(long userId, Folder folder)
053                    throws PortalException;
054    
055    }