001/* 002 * (C) Copyright 2006-2007 Nuxeo SAS (http://nuxeo.com/) and contributors. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the GNU Lesser General Public License 006 * (LGPL) version 2.1 which accompanies this distribution, and is available at 007 * http://www.gnu.org/licenses/lgpl.html 008 * 009 * This library is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012 * Lesser General Public License for more details. 013 * 014 * Contributors: 015 * Nuxeo - initial API and implementation 016 * 017 * $Id: JOOoConvertPluginImpl.java 18651 2007-05-13 20:28:53Z sfermigier $ 018 */ 019 020package org.nuxeo.ecm.webapp.action; 021 022import java.util.List; 023 024import javax.annotation.security.PermitAll; 025 026import org.jboss.seam.annotations.Destroy; 027import org.nuxeo.ecm.core.api.DocumentModel; 028 029public interface DeleteActions { 030 031 /** 032 * Definitively deletes selected documents. 033 */ 034 String purgeSelection(); 035 036 /** 037 * Definitively deletes selected documents of the given {@code listName}. 038 */ 039 String purgeSelection(String listName); 040 041 /** 042 * Definitively deletes param documents. 043 */ 044 String purgeSelection(List<DocumentModel> docsToPurge); 045 046 /** 047 * Moves to trash (delete state) the selected documents. 048 */ 049 String deleteSelection(); 050 051 /** 052 * Moves to trash (delete state) the selected sections. 053 */ 054 String deleteSelectionSections(); 055 056 /** 057 * Moves to trash (delete state) the documents. 058 */ 059 String deleteSelection(List<DocumentModel> docsToDelete); 060 061 /** 062 * Undeletes the selected documents from trash (recycle bin). 063 */ 064 String undeleteSelection(); 065 066 /** 067 * Undeletes the args docs from trash (recycle bin). 068 */ 069 String undeleteSelection(List<DocumentModel> docsToUndelete); 070 071 boolean getCanDeleteItem(DocumentModel container); 072 073 boolean getCanDelete(); 074 075 boolean getCanDelete(String listName); 076 077 boolean getCanDeleteSections(); 078 079 boolean getCanPurge(); 080 081 boolean isTrashManagementEnabled(); 082 083 boolean checkDeletePermOnParents(List<DocumentModel> docsToDelete); 084 085 @Destroy 086 @PermitAll 087 void destroy(); 088 089 void create(); 090 091 /** 092 * Undeletes the current document and its children and his deleted parents. 093 */ 094 void restoreCurrentDocument(); 095 096 /** 097 * Checks if the document is "deleted". 098 */ 099 boolean getCanRestoreCurrentDoc(); 100 101}