luetzkendorf    2005/02/23 04:38:39

  Modified:    src/webdav/server/org/apache/slide/webdav/method
                        CopyMethod.java
  Log:
  fix for 31697 (CopyMethod does not fire WebDAV event)
  
  Revision  Changes    Path
  1.73      +4 -6      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CopyMethod.java
  
  Index: CopyMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CopyMethod.java,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- CopyMethod.java   29 Dec 2004 16:45:51 -0000      1.72
  +++ CopyMethod.java   23 Feb 2005 12:38:39 -0000      1.73
  @@ -159,18 +159,14 @@
           
           if (destUh.isRestrictedUri()) {
               boolean sendError = true;
  -            if( destUh.isWorkspaceUri()        ||
  -               destUh.isWorkingresourceUri()
  -              ) {
  +            if( destUh.isWorkspaceUri() || destUh.isWorkingresourceUri() ) {
                   // COPY on existing WSs or WRs is *not* restricted !!!
                   try {
  -                    if ( WebdavEvent.COPY.isEnabled() ) 
EventDispatcher.getInstance().fireVetoableEvent(WebdavEvent.COPY, new 
WebdavEvent(this));
  -                    
                       content.retrieve(slideToken, destinationUri);
                       sendError = false;
                   }
                   catch( SlideException x ) {
  -                    int statusCode = getErrorCode((SlideException)x);
  +                    int statusCode = getErrorCode(x);
                       sendError( statusCode, x );
                       throw new WebdavException( statusCode );
                   }
  @@ -207,6 +203,8 @@
                   throw new WebdavException( statusCode );
               }
               
  +            if ( WebdavEvent.COPY.isEnabled() ) 
EventDispatcher.getInstance().fireVetoableEvent(WebdavEvent.COPY, new 
WebdavEvent(this));
  +            
               macro.copy(slideToken, sourceUri, destinationUri, 
macroParameters, this, this, null, this);
               
               if (overwrite && destinationExistsBefore) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to