001/*
002 * (C) Copyright 2006-2007 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 *
016 * Contributors:
017 *     Nuxeo - initial API and implementation
018 *
019 * $Id: JOOoConvertPluginImpl.java 18651 2007-05-13 20:28:53Z sfermigier $
020 */
021
022package org.nuxeo.ecm.webapp.action;
023
024import java.util.List;
025
026import javax.annotation.security.PermitAll;
027
028import org.jboss.seam.annotations.Destroy;
029import org.nuxeo.ecm.core.api.DocumentModel;
030
031public interface DeleteActions {
032
033    /**
034     * Definitively deletes selected documents.
035     */
036    String purgeSelection();
037
038    /**
039     * Definitively deletes selected documents of the given {@code listName}.
040     */
041    String purgeSelection(String listName);
042
043    /**
044     * Definitively deletes param documents.
045     */
046    String purgeSelection(List<DocumentModel> docsToPurge);
047
048    /**
049     * Moves to trash (delete state) the selected documents.
050     */
051    String deleteSelection();
052
053    /**
054     * Moves to trash (delete state) the selected sections.
055     */
056    String deleteSelectionSections();
057
058    /**
059     * Moves to trash (delete state) the documents.
060     */
061    String deleteSelection(List<DocumentModel> docsToDelete);
062
063    /**
064     * Undeletes the selected documents from trash (recycle bin).
065     */
066    String undeleteSelection();
067
068    /**
069     * Undeletes the args docs from trash (recycle bin).
070     */
071    String undeleteSelection(List<DocumentModel> docsToUndelete);
072
073    boolean getCanDeleteItem(DocumentModel container);
074
075    boolean getCanDelete();
076
077    boolean getCanDelete(String listName);
078
079    boolean getCanDeleteSections();
080
081    boolean getCanPurge();
082
083    boolean isTrashManagementEnabled();
084
085    boolean checkDeletePermOnParents(List<DocumentModel> docsToDelete);
086
087    @Destroy
088    @PermitAll
089    void destroy();
090
091    void create();
092
093    /**
094     * Undeletes the current document and its children and his deleted parents.
095     */
096    void restoreCurrentDocument();
097
098    /**
099     * Checks if the document is "deleted".
100     */
101    boolean getCanRestoreCurrentDoc();
102
103}