KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > macro > CopyListener


1 /*
2  * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/macro/CopyListener.java,v 1.6.2.1 2004/10/18 08:42:57 pnever Exp $
3  * $Revision: 1.6.2.1 $
4  * $Date: 2004/10/18 08:42:57 $
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
24 package org.apache.slide.macro;
25
26 // import list
27
import org.apache.slide.common.SlideException;
28
29 /**
30  * A CopyListener may be handed to the Macro helper in order to have more
31  * control on the copy operation. The CopyListener will be notified
32  * before and after copying any single resource that is target of the
33  * recursive copy operation.
34  *
35  * @version $Revision: 1.6.2.1 $
36  *
37  **/

38
39 public interface CopyListener {
40     
41     /**
42      * This method is called prior to copying the resource associated by
43      * the given <code>sourceUri</code>. The copy can be prohibited by
44      * throwing a SlideException.
45      *
46      * @param sourceUri the Uri of the resource that will be copied.
47      * @param destinationUri the Uri of the copy.
48      *
49      * @throws SlideException this Exception will be passed to the caller
50      * of the Macro helper (contained in the
51      * MacroDeleteException.
52      */

53     public void beforeCopy(String JavaDoc sourceUri, String JavaDoc destinationUri, boolean isRootOfCopy) throws SlideException;
54     
55     /**
56      * This method is called after copying the resource to
57      * the given <code>destinationUri</code>.
58      *
59      * @param sourceUri the Uri of the resource that has been copied.
60      * @param destinationUri the Uri of the copy.
61      *
62      * @throws SlideException this Exception will be passed to the caller
63      * of the Macro helper (contained in the
64      * MacroDeleteException.
65      */

66     public void afterCopy(String JavaDoc sourceUri, String JavaDoc destinationUri, boolean isRootOfCopy, boolean destinationExists) throws SlideException;
67     
68 }
69
70
Popular Tags