1 /* 2 * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/macro/DeleteListener.java,v 1.6 2004/07/28 09:35:28 ib Exp $ 3 * $Revision: 1.6 $ 4 * $Date: 2004/07/28 09:35:28 $ 5 * 6 * ==================================================================== 7 * 8 * Copyright 1999-2002 The Apache Software Foundation 9 * 10 * Licensed under the Apache License, Version 2.0 (the "License"); 11 * you may not use this file except in compliance with the License. 12 * You may obtain a copy of the License at 13 * 14 * http://www.apache.org/licenses/LICENSE-2.0 15 * 16 * Unless required by applicable law or agreed to in writing, software 17 * distributed under the License is distributed on an "AS IS" BASIS, 18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 * See the License for the specific language governing permissions and 20 * limitations under the License. 21 * 22 */ 23 package org.apache.slide.macro; 24 25 import org.apache.slide.common.SlideException; 26 27 /** 28 * A DeleteListener may be handed to the Macro helper in order to have more 29 * control on the delete operation. The DeleteListener will be notified 30 * before and after deleting any single resource that is target of the 31 * recursive delete operation. 32 * 33 * @version $Revision: 1.6 $ 34 * 35 **/ 36 public interface DeleteListener { 37 38 /** 39 * This method is called prior to deleting the resource associated by 40 * the given <code>targetUri</code>. The deletion can be prohibited by 41 * throwing a SlideException. 42 * 43 * @param targetUri the Uri of the resource that will be deleted. 44 * 45 * @throws SlideException this Exception will be passed to the caller 46 * of the Macro helper (contained in the 47 * MacroDeleteException. 48 */ 49 public void beforeDelete(String targetUri) throws SlideException; 50 51 /** 52 * This method is called after deleting the resource associated by 53 * the given <code>targetUri</code>. 54 * 55 * @param targetUri the Uri of the resource that has been deleted. 56 * 57 * @throws SlideException this Exception will be passed to the caller 58 * of the Macro helper (contained in the 59 * MacroDeleteException. 60 */ 61 public void afterDelete(String targetUri) throws SlideException; 62 63 } 64 65