pnever      2003/09/07 08:49:48

  Modified:    src/share/org/apache/slide/macro MacroImpl.java
  Log:
  Skip lock-null resources at source-side when copying trees
  
  Revision  Changes    Path
  1.34      +29 -5     jakarta-slide/src/share/org/apache/slide/macro/MacroImpl.java
  
  Index: MacroImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/macro/MacroImpl.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- MacroImpl.java    27 Aug 2003 13:53:57 -0000      1.33
  +++ MacroImpl.java    7 Sep 2003 15:49:47 -0000       1.34
  @@ -585,6 +585,11 @@
                            + destinationUri);
           
           try {
  +            // check for lock-null
  +            if (isLockNull(token, sourceUri)) {
  +                // skip
  +                return;
  +            }
               
               // Remember children of orginal source
               ObjectNode sourceNode =
  @@ -777,7 +782,6 @@
           Domain.debug("Delete object : " + targetUri);
           
           try {
  -            
               ObjectNode currentObject =
                   structureHelper.retrieve(token, targetUri, false);
               
  @@ -988,6 +992,26 @@
           return leftStore == rightStore;
       }
       
  +    private boolean isLockNull( SlideToken slideToken, String uriStr ) throws 
ServiceAccessException {
  +        boolean isLockNull = false;
  +        try {
  +            NodeRevisionDescriptor nrd =
  +                contentHelper.retrieve(slideToken, 
contentHelper.retrieve(slideToken, uriStr));
  +            isLockNull = isLockNull( nrd );
  +        }
  +        catch (ServiceAccessException x) {
  +            throw x;
  +        }
  +        catch (SlideException x) {
  +            // ignore silently
  +        }
  +        return isLockNull;
  +    }
  +    
  +    private boolean isLockNull( NodeRevisionDescriptor nrd ) {
  +        return nrd.propertyValueContains("resourcetype", "lock-null");
  +    }
   }
  +
   
   
  
  
  

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

Reply via email to