| Class | Line # | Actions | |||||
|---|---|---|---|---|---|---|---|
| XWikiRecycleBinStoreInterface | 38 | 0 | - | 0 | 0 |
| 1 | /* | |
| 2 | * See the NOTICE file distributed with this work for additional | |
| 3 | * information regarding copyright ownership. | |
| 4 | * | |
| 5 | * This is free software; you can redistribute it and/or modify it | |
| 6 | * under the terms of the GNU Lesser General Public License as | |
| 7 | * published by the Free Software Foundation; either version 2.1 of | |
| 8 | * the License, or (at your option) any later version. | |
| 9 | * | |
| 10 | * This software is distributed in the hope that it will be useful, | |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 13 | * Lesser General Public License for more details. | |
| 14 | * | |
| 15 | * You should have received a copy of the GNU Lesser General Public | |
| 16 | * License along with this software; if not, write to the Free | |
| 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | |
| 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. | |
| 19 | */ | |
| 20 | package com.xpn.xwiki.store; | |
| 21 | ||
| 22 | import java.util.Date; | |
| 23 | ||
| 24 | import org.xwiki.component.annotation.Role; | |
| 25 | ||
| 26 | import com.xpn.xwiki.XWikiContext; | |
| 27 | import com.xpn.xwiki.XWikiException; | |
| 28 | import com.xpn.xwiki.doc.XWikiDeletedDocument; | |
| 29 | import com.xpn.xwiki.doc.XWikiDocument; | |
| 30 | ||
| 31 | /** | |
| 32 | * Interface for RecycleBin feature (XWIKI-543) store system. | |
| 33 | * | |
| 34 | * @version $Id: 1001c96fd7e90f15f8571db1387799d297a36445 $ | |
| 35 | * @since 1.2M1 | |
| 36 | */ | |
| 37 | @Role | |
| 38 | public interface XWikiRecycleBinStoreInterface | |
| 39 | { | |
| 40 | /** | |
| 41 | * Save document to recycle bin. | |
| 42 | * | |
| 43 | * @param doc - document to save | |
| 44 | * @param deleter - the user which delete document | |
| 45 | * @param date - date of delete action | |
| 46 | * @param bTransaction - should use old transaction(false) or create new (true) | |
| 47 | * @param context - used while saving | |
| 48 | * @throws XWikiException if error in saving | |
| 49 | */ | |
| 50 | void saveToRecycleBin(XWikiDocument doc, String deleter, Date date, XWikiContext context, boolean bTransaction) | |
| 51 | throws XWikiException; | |
| 52 | ||
| 53 | /** | |
| 54 | * @return restored document from recycle bin | |
| 55 | * @param doc - document to restore | |
| 56 | * @param index - what deleted document to restore. see {@link XWikiDeletedDocument#getId()} | |
| 57 | * @param context - used while loading | |
| 58 | * @param bTransaction - should use old transaction(false) or create new (true) | |
| 59 | * @throws XWikiException if error while loading | |
| 60 | */ | |
| 61 | XWikiDocument restoreFromRecycleBin(XWikiDocument doc, long index, XWikiContext context, boolean bTransaction) | |
| 62 | throws XWikiException; | |
| 63 | ||
| 64 | /** | |
| 65 | * @return specified deleted document from recycle bin. null if not found. | |
| 66 | * @param doc - deleted document | |
| 67 | * @param index - what deleted document to restore. see {@link XWikiDeletedDocument#getId()} | |
| 68 | * @param context - used while loading | |
| 69 | * @param bTransaction - should use old transaction(false) or create new (true) | |
| 70 | * @throws XWikiException if error while loading | |
| 71 | */ | |
| 72 | XWikiDeletedDocument getDeletedDocument(XWikiDocument doc, long index, XWikiContext context, boolean bTransaction) | |
| 73 | throws XWikiException; | |
| 74 | ||
| 75 | /** | |
| 76 | * @return infos about all delete actions of specific document. sorted by date. | |
| 77 | * @param doc - the deleted document | |
| 78 | * @param context - used to load | |
| 79 | * @param bTransaction - should use old transaction(false) or create new (true) | |
| 80 | * @throws XWikiException - if error in loading | |
| 81 | */ | |
| 82 | XWikiDeletedDocument[] getAllDeletedDocuments(XWikiDocument doc, XWikiContext context, boolean bTransaction) | |
| 83 | throws XWikiException; | |
| 84 | ||
| 85 | /** | |
| 86 | * Permanently delete document from recycle bin. | |
| 87 | * | |
| 88 | * @param doc - document to delete | |
| 89 | * @param index - which instance document in recycle bin to delete | |
| 90 | * @param context - used for environment | |
| 91 | * @param bTransaction - should use old transaction(false) or create new (true) | |
| 92 | * @throws XWikiException if eny error | |
| 93 | */ | |
| 94 | void deleteFromRecycleBin(XWikiDocument doc, long index, XWikiContext context, boolean bTransaction) | |
| 95 | throws XWikiException; | |
| 96 | } |