KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > webdav > method > MoveMethod


1 /*
2  * $Header: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/MoveMethod.java,v 1.72.2.2 2004/10/18 08:42:58 pnever Exp $
3  * $Revision: 1.72.2.2 $
4  * $Date: 2004/10/18 08:42:58 $
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.webdav.method;
25
26 import java.io.IOException JavaDoc;
27 import java.util.Iterator JavaDoc;
28
29 import org.apache.slide.common.NamespaceAccessToken;
30 import org.apache.slide.common.ServiceAccessException;
31 import org.apache.slide.common.SlideException;
32 import org.apache.slide.content.NodeProperty;
33 import org.apache.slide.content.NodeRevisionDescriptor;
34 import org.apache.slide.content.NodeRevisionDescriptors;
35 import org.apache.slide.content.NodeRevisionNumber;
36 import org.apache.slide.content.RevisionDescriptorNotFoundException;
37 import org.apache.slide.content.RevisionNotFoundException;
38 import org.apache.slide.content.NodeProperty.NamespaceCache;
39 import org.apache.slide.event.EventDispatcher;
40 import org.apache.slide.macro.CopyListener;
41 import org.apache.slide.macro.DeleteListener;
42 import org.apache.slide.macro.Macro;
43 import org.apache.slide.macro.MacroException;
44 import org.apache.slide.macro.MacroParameters;
45 import org.apache.slide.search.RequestedResource;
46 import org.apache.slide.search.Search;
47 import org.apache.slide.search.SearchQuery;
48 import org.apache.slide.search.SearchQueryResult;
49 import org.apache.slide.structure.ObjectNode;
50 import org.apache.slide.structure.ObjectNotFoundException;
51 import org.apache.slide.util.Configuration;
52 import org.apache.slide.webdav.WebdavException;
53 import org.apache.slide.webdav.WebdavServletConfig;
54 import org.apache.slide.webdav.event.WebdavEvent;
55 import org.apache.slide.webdav.util.DaslConstants;
56 import org.apache.slide.webdav.util.DeltavConstants;
57 import org.apache.slide.webdav.util.PreconditionViolationException;
58 import org.apache.slide.webdav.util.PropertyHelper;
59 import org.apache.slide.webdav.util.UriHandler;
60 import org.apache.slide.webdav.util.VersioningHelper;
61 import org.apache.slide.webdav.util.ViolatedPrecondition;
62 import org.apache.slide.webdav.util.WebdavStatus;
63 import org.apache.slide.webdav.util.resourcekind.AbstractResourceKind;
64 import org.apache.slide.webdav.util.resourcekind.CheckedOutVersionControlled;
65 import org.apache.slide.webdav.util.resourcekind.DeltavCompliantUnmappedUrl;
66 import org.apache.slide.webdav.util.resourcekind.ResourceKind;
67 import org.apache.slide.webdav.util.resourcekind.VersionControlled;
68 import org.apache.slide.webdav.util.resourcekind.Working;
69 import org.jdom.Element;
70 import org.jdom.JDOMException;
71
72 /**
73  * MOVE Method.
74  *
75  */

76 public class MoveMethod extends AbstractMultistatusResponseMethod implements DeltavConstants, DeleteListener, CopyListener, WriteMethod {
77
78
79     /**
80      * The VersioningHelper used by this instance.
81      */

82     protected VersioningHelper versioningHelper = null;
83
84     /**
85      * The PropertyHelper used by this instance.
86      */

87     protected PropertyHelper propertyHelper = null;
88
89     /**
90      * Indicates if the source of the MOVE request is a workspace.
91      */

92     protected boolean isRequestSourceWorkspace = false;
93
94     /**
95      * Indicates if the source of the current copy operation is a VCR.
96      * Used by {@link #beforeCopy beforeCopy()} and {@link #afterCopy afterCopy()}.
97      */

98     protected boolean isCopySourceVCR = false;
99
100     /**
101      * The Element returned by {@link #getWorkingResourceSearchElement
102      * getWorkingResourceSearchElement()}.
103      */

104     protected Element basicSearch = null;
105
106     /**
107      * The <literal> Element used in the basic search query returned by
108      * {@link #getWorkingResourceSearchElement getWorkingResourceSearchElement()}.
109      */

110     protected Element literal = null;
111
112     private boolean destinationExistsBefore = false;
113
114     // ----------------------------------------------------------- Constructors
115

116
117     /**
118      * Constructor.
119      *
120      * @param token the token for accessing the namespace
121      * @param config configuration of the WebDAV servlet
122      */

123     public MoveMethod(NamespaceAccessToken token, WebdavServletConfig config) {
124         super(token, config);
125     }
126
127
128     // ------------------------------------------------------ Protected Methods
129

130
131
132     /**
133      * Execute request.
134      *
135      * @exception WebdavException Unrecoverable error while moving the files
136      */

137     protected void executeRequest()
138         throws WebdavException, IOException JavaDoc {
139
140         versioningHelper = VersioningHelper.getVersioningHelper(slideToken,
141                                                                 token,
142                                                                 req,
143                                                                 resp,
144                                                                 config);
145         propertyHelper = PropertyHelper.getPropertyHelper(slideToken, token, getConfig());
146
147         // Prevent dirty reads
148
slideToken.setForceStoreEnlistment(true);
149
150         // check lock-null resources
151
try {
152             if (isLockNull(sourceUri)) {
153                 int statusCode = WebdavStatus.SC_NOT_FOUND;
154                 sendError( statusCode, "lock-null resource", new Object JavaDoc[]{sourceUri} );
155                 throw new WebdavException( statusCode );
156             } else if (isLocked(sourceUri)) {
157                 int statusCode = WebdavStatus.SC_LOCKED;
158                 sendError( statusCode, getClass().getName()+".noLocked", new Object JavaDoc[]{sourceUri} );
159                 throw new WebdavException( statusCode );
160             }
161         }
162         catch (ServiceAccessException e) {
163             int statusCode = getErrorCode((Exception JavaDoc)e);
164             sendError( statusCode, e );
165             throw new WebdavException( statusCode );
166         }
167
168         int depth = requestHeaders.getDepth(INFINITY);
169         if (depth < INFINITY) {
170             int sc = WebdavStatus.SC_PRECONDITION_FAILED;
171             sendError( sc, "Invalid header Depth: "+depth );
172             throw new WebdavException( sc );
173         }
174         
175         MacroParameters macroParameters = null;
176         boolean isCollection = isCollection(sourceUri);
177
178         if (overwrite) {
179             macroParameters = Macro.RECURSIVE_OVERWRITE_PARAMETERS;
180         } else {
181             macroParameters = Macro.DEFAULT_PARAMETERS;
182         }
183
184         // check destination URI
185
UriHandler destinationUriHandler = UriHandler.getUriHandler(destinationUri);
186         if (destinationUriHandler.isRestrictedUri()) {
187             int statusCode = WebdavStatus.SC_FORBIDDEN;
188             sendError( statusCode, getClass().getName()+".restrictedDestinationUri", new Object JavaDoc[]{destinationUri} );
189             throw new WebdavException( statusCode );
190         }
191
192         UriHandler sourceUriHandler = UriHandler.getUriHandler(sourceUri);
193         isRequestSourceWorkspace = sourceUriHandler.isWorkspaceUri();
194
195         try {
196             // check preconditions
197
ViolatedPrecondition violatedPrecondition = getPreconditionViolation(sourceUri, destinationUri);
198             if (violatedPrecondition != null) {
199                 PreconditionViolationException e =
200                     new PreconditionViolationException(violatedPrecondition, sourceUri);
201                 sendPreconditionViolation(e);
202                 throw e;
203             }
204
205             destinationExistsBefore = exists(destinationUri);
206             if (!overwrite && destinationExistsBefore) {
207                 int statusCode = WebdavStatus.SC_PRECONDITION_FAILED;
208                 sendError( statusCode, getClass().getName()+".noOverwrite", new Object JavaDoc[]{destinationUri} );
209                 throw new WebdavException( statusCode );
210             }
211             if ( WebdavEvent.MOVE.isEnabled() ) EventDispatcher.getInstance().fireVetoableEvent(WebdavEvent.MOVE, new WebdavEvent(this));
212
213             macro.move(slideToken, sourceUri, destinationUri, macroParameters, null, this, null, this);
214
215             if (overwrite && destinationExistsBefore) {
216                 resp.setStatus(WebdavStatus.SC_NO_CONTENT);
217             } else {
218                 resp.setStatus(WebdavStatus.SC_CREATED);
219             }
220         } catch (MacroException e) {
221             if(generateMultiStatusResponse(isCollection, e, requestUri)) {
222                 String JavaDoc errorMessage = generateErrorMessage(e);
223                 // Write it on the servlet writer
224
resp.setStatus(WebdavStatus.SC_MULTI_STATUS);
225                 try {
226                     resp.setContentType(TEXT_XML_UTF_8);
227                     resp.getWriter().write(errorMessage);
228                 } catch(IOException JavaDoc ex) {
229                     // Critical error ... Servlet container is dead or something
230
int statusCode = WebdavStatus.SC_INTERNAL_SERVER_ERROR;
231                     sendError( statusCode, e );
232                     throw new WebdavException( statusCode );
233                 }
234             } else {
235                 // Returning 207 on non-collection requests is generally
236
// considered bad. So let's not do it, since this way
237
// makes clients generally behave better.
238
SlideException exception = (SlideException)e.enumerateExceptions().nextElement();
239                 if (exception instanceof PreconditionViolationException) {
240                     try {
241                         sendPreconditionViolation((PreconditionViolationException)exception);
242                     } catch(IOException JavaDoc ex) {
243                         // Critical error ... Servlet container is dead or something
244
int statusCode = WebdavStatus.SC_INTERNAL_SERVER_ERROR;
245                         sendError( statusCode, e );
246                         throw new WebdavException( statusCode );
247                     }
248                 }
249                 else {
250                     int statusCode = getErrorCode( exception );
251                     sendError( statusCode, exception );
252                     throw new WebdavException( statusCode );
253                 }
254             }
255             //
256
// make sure the transaction is aborted
257
// throw any WebDAV exception to indicate the transaction wants to be aborted
258
//
259
throw new WebdavException(WebdavStatus.SC_ACCEPTED, false);
260         }
261         catch (SlideException e) {
262             int statusCode = getErrorCode( e );
263             sendError( statusCode, e );
264             throw new WebdavException( statusCode );
265         }
266     }
267
268
269     /**
270      * Get return status based on exception type.
271      */

272     protected int getErrorCode(SlideException ex) {
273         try {
274             throw ex;
275         } catch(RevisionNotFoundException e) {
276             return WebdavStatus.SC_NOT_FOUND;
277         } catch (SlideException e) {
278             return super.getErrorCode(e);
279         }
280     }
281
282     /**
283      * Checks the (DeltaV) preconditions
284      * <ul>
285      * <li>&lt;DAV:resource-must-be-null&gt;</li>
286      * <li>&lt;DAV:workspace-location-ok&gt;</li>
287      * </ul>
288      *
289      * @param sourceUri the URI of the resource.
290      * @param destinationUri the URI of the resource.
291      *
292      * @return the precondition that has been violated (if any).
293      *
294      * @throws SlideException
295      */

296     private ViolatedPrecondition getPreconditionViolation(String JavaDoc sourceUri, String JavaDoc destinationUri) throws SlideException {
297
298         ViolatedPrecondition violatedPrecondition = null;
299         if( Configuration.useVersionControl() ) {
300
301             if (isRequestSourceWorkspace) {
302
303                 UriHandler destinationUriHandler = UriHandler.getUriHandler(destinationUri);
304                 NodeRevisionDescriptors destinationRevisionDescriptors = null;
305                 NodeRevisionDescriptor destinationRevisionDescriptor = null;
306                 try {
307                     destinationRevisionDescriptors = content.retrieve( slideToken, destinationUri);
308                     destinationRevisionDescriptor = content.retrieve( slideToken, destinationRevisionDescriptors);
309                 }
310                 catch( ObjectNotFoundException e ) {}; // can be ignored here!
311

312                 ResourceKind destinationResourceKind =
313                     AbstractResourceKind.determineResourceKind( token, destinationUri, destinationRevisionDescriptor );
314
315                 if( !(destinationResourceKind instanceof DeltavCompliantUnmappedUrl) ) {
316                     return new ViolatedPrecondition(C_RESOURCE_MUST_BE_NULL,
317                                                     WebdavStatus.SC_CONFLICT);
318                 }
319                 if( !destinationUriHandler.isWorkspaceUri() ) {
320                     return new ViolatedPrecondition(C_WORKSPACE_LOCATION_OK,
321                                                     WebdavStatus.SC_CONFLICT);
322                 }
323             }
324         }
325         if (isCollection(sourceUri)) {
326             UriHandler destinationUriHandler = UriHandler.getUriHandler(destinationUri);
327             ObjectNode destinationParentNode =
328                 structure.retrieve(slideToken, destinationUriHandler.getParentUriHandler().toString());
329             ObjectNode sourceNode =
330                 structure.retrieve(slideToken, sourceUri);
331             if (isDescendant(destinationParentNode, sourceNode)) {
332                 return new ViolatedPrecondition(C_CYCLE_ALLOWED, WebdavStatus.SC_FORBIDDEN);
333             }
334         }
335
336         return violatedPrecondition;
337     }
338
339     // ------------------------------------------------------ Interface CopyListener
340

341     /**
342      * This method is called prior to copying the resource associated by
343      * the given <code>sourceUri</code>. The copy can be prohibited by
344      * throwing a SlideException.
345      *
346      * @param sourceUri the Uri of the resource that will be copied.
347      * @param destinationUri the Uri of the copy.
348      *
349      * @throws SlideException this Exception will be passed to the caller
350      * of the Macro helper (contained in the
351      * MacroDeleteException.
352      */

353     public void beforeCopy(String JavaDoc sourceUri, String JavaDoc destinationUri, boolean isRootOfCopy) throws SlideException {
354
355         if( Configuration.useVersionControl() ) {
356
357             UriHandler uriHandler = UriHandler.getUriHandler(sourceUri);
358             if (uriHandler.isVersionUri()) {
359                 throw new PreconditionViolationException(new ViolatedPrecondition(DeltavConstants.C_CANNOT_RENAME_VERSION,
360                                                                                   WebdavStatus.SC_FORBIDDEN),
361                                                          sourceUri);
362             }
363             if (uriHandler.isHistoryUri()) {
364                 throw new PreconditionViolationException(new ViolatedPrecondition(DeltavConstants.C_CANNOT_RENAME_HISTORY,
365                                                                                   WebdavStatus.SC_FORBIDDEN),
366                                                          sourceUri);
367             }
368             if (uriHandler.isWorkingresourceUri()) {
369                 throw new PreconditionViolationException(new ViolatedPrecondition(DeltavConstants.C_CANNOT_RENAME_WORKING_RESOURCE,
370                                                                                   WebdavStatus.SC_FORBIDDEN),
371                                                          sourceUri);
372             }
373
374             NodeRevisionDescriptors sourceRevisionDescriptors =
375                 content.retrieve( slideToken, sourceUri);
376             NodeRevisionDescriptor sourceRevisionDescriptor =
377                 content.retrieve( slideToken, sourceRevisionDescriptors);
378             ResourceKind resourceKind = AbstractResourceKind.determineResourceKind(token,
379                                                                                    sourceRevisionDescriptors,
380                                                                                    sourceRevisionDescriptor);
381             isCopySourceVCR = (resourceKind instanceof VersionControlled);
382
383             // if resource being moved is a checked-out VCR or a WR,
384
// update its URI in the DAV:checkout-set property of the VR
385
if(resourceKind instanceof CheckedOutVersionControlled || resourceKind instanceof Working) {
386                 String JavaDoc vrUri =
387                     VersioningHelper.getUriOfAssociatedVR(token, slideToken, content, sourceUri);
388                 NodeRevisionDescriptors vrNrds = content.retrieve(slideToken, vrUri);
389                 NodeRevisionDescriptor vrNrd = content.retrieve(slideToken, vrNrds);
390                 try {
391                     PropertyHelper.removeHrefFromProperty(vrNrd, P_CHECKOUT_SET, sourceUri);
392                     PropertyHelper.addHrefToProperty(vrNrd, P_CHECKOUT_SET, destinationUri);
393                     content.store(slideToken, vrNrds.getUri(), vrNrd, null);
394                 }
395                 catch (JDOMException e) {
396                     throw new SlideException(
397                         "Unable to update DAV:checkout-set of "+vrUri+": "+e.getMessage() );
398                 }
399             }
400         }
401     }
402
403     /**
404      * This method is called after copying the resource to
405      * the given <code>destinationUri</code>.
406      *
407      * @param sourceUri the Uri of the resource that has been copied.
408      * @param destinationUri the Uri of the copy.
409      *
410      * @throws SlideException this Exception will be passed to the caller
411      * of the Macro helper (contained in the
412      * MacroDeleteException.
413      */

414     public void afterCopy(String JavaDoc sourceUri, String JavaDoc destinationUri, boolean isRootOfCopy, boolean destinationExists) throws SlideException {
415
416         if( Configuration.useVersionControl() ) {
417
418             NodeRevisionDescriptors sourceNrds =
419                 content.retrieve( slideToken, sourceUri);
420             NodeRevisionDescriptors destinationNrds =
421                 content.retrieve( slideToken, destinationUri);
422             NodeRevisionDescriptor destinationNrd =
423                 content.retrieve( slideToken, destinationNrds );
424
425             // copy DeltaV-specific "0.0" revision if exists
426
try {
427                 NodeRevisionDescriptor sourceNrd00 =
428                     content.retrieve( slideToken, sourceNrds, NodeRevisionNumber.HIDDEN_0_0 );
429                 NodeRevisionDescriptor destinationNrd00 = sourceNrd00.cloneObject();
430
431                 try {
432                     content.retrieve( slideToken, destinationNrds, NodeRevisionNumber.HIDDEN_0_0 );
433                     content.store( slideToken, destinationUri, destinationNrd00, null ); // revisionContent=null
434
}
435                 catch( RevisionDescriptorNotFoundException x ) {
436                     content.create( slideToken, destinationUri, null, destinationNrd00, null ); // branch=null, revisionContent=null
437
}
438             }
439             catch (ServiceAccessException e) {
440                 throw e;
441             }
442             catch (SlideException e) {}
443
444             handleWorkspacePostconditions(destinationNrd, destinationUri);
445             handleWorkingResourcePostconditions(sourceUri, destinationUri);
446         }
447     }
448
449     /**
450      * Handles the working resource postconditions.
451      * <ul>
452      * <li>DAV:update-auto-update</li>
453      * </ul>
454      *
455      * @param sourceUri the Uri of the resource that has been copied.
456      * @param destinationUri the Uri of the copy.
457      *
458      * @throws SlideException
459      */

460     private void handleWorkingResourcePostconditions(String JavaDoc sourceUri, String JavaDoc destinationUri) throws SlideException {
461
462         if (isCopySourceVCR) {
463
464             Element basicSearch = getWorkingResourceSearchElement(sourceUri);
465             String JavaDoc grammarNamespace = basicSearch.getNamespaceURI();
466             Search searchHelper = token.getSearchHelper();
467             
468             SearchQuery searchQuery = searchHelper.createSearchQuery(
469                     grammarNamespace,
470                     basicSearch,
471                     slideToken,
472                     Integer.MAX_VALUE,
473                     getSlideContextPath() + sourceUri);
474
475             SearchQueryResult queryResult = searchHelper.search(slideToken, searchQuery);
476
477             Iterator JavaDoc queryResultIterator = queryResult.iterator();
478             RequestedResource requestedResource = null;
479             NodeRevisionDescriptors workingResourceRevisionDescriptors = null;
480             NodeRevisionDescriptor workingResourceRevisionDescriptor = null;
481             NodeProperty autoUpdateProperty = null;
482             String JavaDoc workingResourceUri = null;
483
484             while (queryResultIterator.hasNext()) {
485
486                 requestedResource = (RequestedResource)queryResultIterator.next();
487                 workingResourceUri = requestedResource.getUri();
488                 workingResourceRevisionDescriptors =
489                     content.retrieve( slideToken, workingResourceUri);
490                 workingResourceRevisionDescriptor =
491                     content.retrieve( slideToken, workingResourceRevisionDescriptors);
492                 autoUpdateProperty = new NodeProperty(P_AUTO_UPDATE,
493                                                       propertyHelper.createHrefValue(destinationUri));
494                 workingResourceRevisionDescriptor.setProperty(autoUpdateProperty);
495                 content.store(slideToken,
496                               workingResourceRevisionDescriptors.getUri(),
497                               workingResourceRevisionDescriptor,
498                               null);
499             }
500         }
501     }
502
503     /**
504      * Returns the query document used to search all resources that have
505      * a &lt;auto-update&gt; property with a &lt;href&gt; value containing
506      * the given <code>resourcePath</code>.
507      *
508      * @param resourcePath the Uri to search for.
509      *
510      * @return the query document.
511      */

512     protected Element getWorkingResourceSearchElement(String JavaDoc resourcePath) {
513
514         if (basicSearch == null) {
515             basicSearch = new Element(DaslConstants.E_BASICSEARCH,
516                                       DNSP);
517
518             Element select = new Element(DaslConstants.E_SELECT,
519                                          DNSP);
520             basicSearch.addContent(select);
521             Element prop = new Element(E_PROP,
522                                        DNSP);
523             select.addContent(prop);
524             Element autoUpdate = new Element(P_AUTO_UPDATE,
525                                              DNSP);
526             prop.addContent(autoUpdate);
527
528             Element from = new Element(DaslConstants.E_FROM,
529                                        DNSP);
530             basicSearch.addContent(from);
531             Element scope = new Element(DaslConstants.E_SCOPE,
532                                         DNSP);
533             from.addContent(scope);
534             Element href = new Element(E_HREF,
535                                        DNSP);
536             scope.addContent(href);
537             href.setText("");
538
539             Iterator JavaDoc excludeIterator = propertyHelper.getNonVcrPathExcludeList().iterator();
540             while (excludeIterator.hasNext()) {
541                 scope.addContent((Element)excludeIterator.next());
542             }
543
544             Element where = new Element(DaslConstants.E_WHERE,
545                                         DNSP);
546             basicSearch.addContent(where);
547             Element propcontains = new Element(DaslConstants.E_PROPCONTAINS,
548                                                NamespaceCache.SLIDE_NAMESPACE);
549             where.addContent(propcontains);
550             propcontains.addContent((Element)prop.clone());
551             literal = new Element(DaslConstants.E_LITERAL,
552                                   DNSP);
553             propcontains.addContent(literal);
554         }
555         literal.setText(resourcePath);
556
557         return basicSearch;
558     }
559
560     /**
561      * Handles the workspace postconditions
562      * <ul>
563      * <li>DAV:workspace-moved</li>
564      * <li>DAV:workspace-member-moved</li>
565      * </ul>
566      *
567      * @param revisionDescriptor the NodeRevisionDescriptor of the resource.
568      * @param resourceUri the URI of the resource.
569      *
570      * @throws SlideException
571      */

572     protected void handleWorkspacePostconditions(NodeRevisionDescriptor revisionDescriptor, String JavaDoc resourceUri) throws SlideException {
573
574         if( Configuration.useVersionControl() ) {
575
576             if (isRequestSourceWorkspace) {
577                 // DAV:workspace-moved
578
revisionDescriptor.setProperty(
579                     new NodeProperty( P_WORKSPACE, propertyHelper.createHrefValue(this.destinationUri)) );
580             }
581             else {
582                 // DAV:workspace-member-moved
583
versioningHelper.setWorkspaceProperty(resourceUri, revisionDescriptor);
584             }
585             content.store(slideToken, resourceUri, revisionDescriptor, null);
586         }
587     }
588
589
590     // ------------------------------------------------------ Interface DeleteListener
591

592     /**
593      * This method is called prior to deleting the resource associated by
594      * the given <code>targetUri</code>. The deletion can be prohibited by
595      * throwing a SlideException.
596      *
597      * @param targetUri the Uri of the resource that will be deleted.
598      *
599      * @throws SlideException this Exception will be passed to the caller
600      * of the Macro helper (contained in the
601      * MacroDeleteException.
602      */

603     public void beforeDelete(String JavaDoc targetUri) throws SlideException {
604     }
605
606     /**
607      * This method is called after deleting the resource associated by
608      * the given <code>targetUri</code>.
609      *
610      * @param targetUri the Uri of the resource that will be deleted.
611      *
612      * @throws SlideException this Exception will be passed to the caller
613      * of the Macro helper (contained in the
614      * MacroDeleteException.
615      */

616     public void afterDelete(String JavaDoc targetUri) throws SlideException {
617     }
618 }
619
620
621
Popular Tags