KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/macro/Macro.java,v 1.19 2004/07/28 09:35:27 ib Exp $
3  * $Revision: 1.19 $
4  * $Date: 2004/07/28 09:35:27 $
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 org.apache.slide.common.SlideToken;
27
28 /**
29  * Macro helper class.
30  *
31  * @version $Revision: 1.19 $
32  */

33 public interface Macro {
34     
35     public static final MacroParameters DEFAULT_PARAMETERS =
36         new MacroParameters();
37     
38     public static final MacroParameters RECURSIVE_OVERWRITE_PARAMETERS =
39         new MacroParameters(true, true);
40     
41     public final static String JavaDoc ALREADY_COPIED = "alreadyCopied";
42     public final static String JavaDoc PARENT_BINDINGS = "parentBindings";
43     
44     
45     // ------------------------------------------------------ Interface Methods
46

47     
48     /**
49      * Recursive copy with overwrite macro.
50      *
51      * @param token Credentials token
52      * @param sourceUri Uri of the source
53      * @param destinationUri Uri of the destination
54      * @exception CopyMacroException Generic Slide exception
55      */

56     void copy(SlideToken token, String JavaDoc sourceUri,
57               String JavaDoc destinationUri)
58         throws CopyMacroException, DeleteMacroException;
59     
60     /**
61      * Recursive copy with overwrite macro.
62      *
63      * @param token Credentials token
64      * @param sourceUri Uri of the source
65      * @param destinationUri Uri of the destination
66      * @param copyRedirector the CopyRoutRedirector may be used to redirect
67      * the source and/or destination URI of the
68      * <code>copy</code> operation.
69      * (May be <code>null</code>.)
70      * @param copyListener the CopyListener that will be notified
71      * before and after copying a resource.
72      * (May be <code>null</code>)
73      * @param deleteRedirector the DeleteTargetRedirector may be used to redirect
74      * the <code>delete</code> operation to a different
75      * target. (May be <code>null</code>.)
76      * @param deleteListener the DeleteListener that will be notified
77      * before and after deleting a destination
78      * that will be overwritten by the copy.
79      * (May be <code>null</code>)
80      * @exception CopyMacroException Generic Slide exception
81      */

82     void copy(SlideToken token, String JavaDoc sourceUri,
83               String JavaDoc destinationUri, CopyRouteRedirector copyRedirector, CopyListener copyListener,
84               DeleteTargetRedirector deleteRedirector, DeleteListener deleteListener)
85         throws CopyMacroException, DeleteMacroException;
86     
87     
88     /**
89      * Copy macro.
90      *
91      * @param token Credentials token
92      * @param sourceUri Uri of the source
93      * @param destinationUri Uri of the destination
94      * @param parameters Macro parameters
95      * @exception CopyMacroException Generic Slide exception
96      */

97     void copy(SlideToken token, String JavaDoc sourceUri,
98               String JavaDoc destinationUri, MacroParameters parameters)
99         throws CopyMacroException, DeleteMacroException;
100     
101     /**
102      * Copy macro.
103      *
104      * @param token Credentials token
105      * @param sourceUri Uri of the source
106      * @param destinationUri Uri of the destination
107      * @param parameters Macro parameters
108      * @param copyRedirector the CopyRoutRedirector may be used to redirect
109      * the source and/or destination URI of the
110      * <code>copy</code> operation.
111      * (May be <code>null</code>.)
112      * @param copyListener the CopyListener that will be notified
113      * before and after copying a resource.
114      * (May be <code>null</code>)
115      * @param deleteRedirector the DeleteTargetRedirector may be used to redirect
116      * the <code>delete</code> operation to a different
117      * target. (May be <code>null</code>.)
118      * @param deleteListener the DeleteListener that will be notified
119      * before and after deleting a destination
120      * that will be overwritten by the copy.
121      * (May be <code>null</code>)
122      * @exception CopyMacroException Generic Slide exception
123      */

124     void copy(SlideToken token, String JavaDoc sourceUri,
125               String JavaDoc destinationUri, MacroParameters parameters,
126               CopyRouteRedirector copyRedirector, CopyListener copyListener,
127               DeleteTargetRedirector deleteRedirector, DeleteListener deleteListener)
128         throws CopyMacroException, DeleteMacroException;
129     
130     
131     /**
132      * Recursive move with overwrite macro.
133      *
134      * @param token Credentials token
135      * @param sourceUri Uri of the source
136      * @param destinationUri Uri of the destination
137      * @exception CopyMacroException Exception occured during copy
138      * @exception DeleteMacroException Exception occured during deletion
139      */

140     void move(SlideToken token, String JavaDoc sourceUri,
141               String JavaDoc destinationUri)
142         throws CopyMacroException, DeleteMacroException;
143     
144     /**
145      * Recursive move with overwrite macro.
146      *
147      * @param token Credentials token
148      * @param sourceUri Uri of the source
149      * @param destinationUri Uri of the destination
150      * @param copyRedirector the CopyRoutRedirector may be used to redirect
151      * the source and/or destination URI of the
152      * <code>copy</code> operation.
153      * (May be <code>null</code>.)
154      * @param copyListener the CopyListener that will be notified
155      * before and after copying a resource.
156      * (May be <code>null</code>)
157      * @param deleteRedirector the DeleteTargetRedirector may be used to redirect
158      * the <code>delete</code> operation to a different
159      * target. (May be <code>null</code>.)
160      * @param deleteListener the DeleteListener that will be notified
161      * before and after deleting a resource.
162      * (May be <code>null</code>)
163      * @exception CopyMacroException Exception occured during copy
164      * @exception DeleteMacroException Exception occured during deletion
165      */

166     void move(SlideToken token, String JavaDoc sourceUri,
167               String JavaDoc destinationUri, CopyRouteRedirector copyRedirector, CopyListener copyListener,
168               DeleteTargetRedirector deleteRedirector, DeleteListener deleteListener)
169         throws CopyMacroException, DeleteMacroException;
170     
171     
172     /**
173      * Move macro.
174      *
175      * @param token Credentials token
176      * @param sourceUri Uri of the source
177      * @param destinationUri Uri of the destination
178      * @param parameters Macro parameters
179      * @exception CopyMacroException Exception occured during copy
180      * @exception DeleteMacroException Exception occured during deletion
181      */

182     void move(SlideToken token, String JavaDoc sourceUri,
183               String JavaDoc destinationUri, MacroParameters parameters)
184         throws CopyMacroException, DeleteMacroException;
185     
186     /**
187      * Move macro.
188      *
189      * @param token Credentials token
190      * @param sourceUri Uri of the source
191      * @param destinationUri Uri of the destination
192      * @param parameters Macro parameters
193      * @param copyRedirector the CopyRoutRedirector may be used to redirect
194      * the source and/or destination URI of the
195      * <code>copy</code> operation.
196      * (May be <code>null</code>.)
197      * @param copyListener the CopyListener that will be notified
198      * before and after copying a resource.
199      * (May be <code>null</code>)
200      * @param deleteRedirector the DeleteTargetRedirector may be used to redirect
201      * the <code>delete</code> operation to a different
202      * target. (May be <code>null</code>.)
203      * @param deleteListener the DeleteListener that will be notified
204      * before and after deleting a resource.
205      * (May be <code>null</code>)
206      * @exception CopyMacroException Exception occured during copy
207      * @exception DeleteMacroException Exception occured during deletion
208      */

209     void move(SlideToken token, String JavaDoc sourceUri,
210               String JavaDoc destinationUri, MacroParameters parameters,
211               CopyRouteRedirector copyRedirector, CopyListener copyListener,
212               DeleteTargetRedirector deleteRedirector, DeleteListener deleteListener)
213         throws CopyMacroException, DeleteMacroException;
214     
215     
216     /**
217      * Recursive delete.
218      *
219      * @param token Credentials token
220      * @param targetUri Uri of the object to delete
221      * @exception DeleteMacroException Generic Slide exception
222      */

223     void delete(SlideToken token, String JavaDoc targetUri)
224         throws DeleteMacroException;
225     
226     /**
227      * Recursive delete.
228      *
229      * @param token Credentials token
230      * @param targetUri Uri of the object to delete
231      * @param deleteRedirector the DeleteTargetRedirector may be used to redirect
232      * the <code>delete</code> operation to a different
233      * target. (May be <code>null</code>.)
234      * @param deleteListener the DeleteListener that will be notified
235      * before and after deleting a resource.
236      * (May be <code>null</code>)
237      * @exception DeleteMacroException Generic Slide exception
238      */

239     void delete(SlideToken token, String JavaDoc targetUri,
240                 DeleteTargetRedirector deleteRedirector, DeleteListener deleteListener)
241         throws DeleteMacroException;
242     
243     
244     /**
245      * Delete macro.
246      *
247      * @param token Credentials token
248      * @param targetUri Uri of the source
249      * @param parameters Macro parameters, not used right now,
250      * so it can be null
251      * @exception DeleteMacroException Generic Slide exception
252      */

253     void delete(SlideToken token, String JavaDoc targetUri,
254                 MacroParameters parameters)
255         throws DeleteMacroException;
256     
257     
258     /**
259      * Delete macro.
260      *
261      * @param token Credentials token
262      * @param targetUri Uri of the source
263      * @param parameters Macro parameters, not used right now,
264      * so it can be null
265      * @param deleteRedirector the DeleteTargetRedirector may be used to redirect
266      * the <code>delete</code> operation to a different
267      * target. (May be <code>null</code>.)
268      * @param deleteListener the DeleteListener that will be notified
269      * before and after deleting a resource.
270      * (May be <code>null</code>)
271      * @exception DeleteMacroException Generic Slide exception
272      */

273     void delete(SlideToken token, String JavaDoc targetUri, MacroParameters parameters,
274                 DeleteTargetRedirector deleteRedirector, DeleteListener deleteListener)
275         throws DeleteMacroException;
276     
277 }
278
Popular Tags