org.apache.slide.macro
Interface CopyListener


public interface CopyListener

A CopyListener may be handed to the Macro helper in order to have more control on the copy operation. The CopyListener will be notified before and after copying any single resource that is target of the recursive copy operation.

Version:
$Revision: 1.7 $

Method Summary
 void afterCopy(java.lang.String sourceUri, java.lang.String destinationUri, boolean isRootOfCopy, boolean destinationExists)
          This method is called after copying the resource to the given destinationUri.
 void beforeCopy(java.lang.String sourceUri, java.lang.String destinationUri, boolean isRootOfCopy)
          This method is called prior to copying the resource associated by the given sourceUri.
 

Method Detail

beforeCopy

public void beforeCopy(java.lang.String sourceUri,
                       java.lang.String destinationUri,
                       boolean isRootOfCopy)
                throws SlideException
This method is called prior to copying the resource associated by the given sourceUri. The copy can be prohibited by throwing a SlideException.

Parameters:
sourceUri - the Uri of the resource that will be copied.
destinationUri - the Uri of the copy.
Throws:
SlideException - this Exception will be passed to the caller of the Macro helper (contained in the MacroDeleteException.

afterCopy

public void afterCopy(java.lang.String sourceUri,
                      java.lang.String destinationUri,
                      boolean isRootOfCopy,
                      boolean destinationExists)
               throws SlideException
This method is called after copying the resource to the given destinationUri.

Parameters:
sourceUri - the Uri of the resource that has been copied.
destinationUri - the Uri of the copy.
Throws:
SlideException - this Exception will be passed to the caller of the Macro helper (contained in the MacroDeleteException.