You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by pn...@apache.org on 2002/05/08 18:04:34 UTC

cvs commit: jakarta-slide/src/webdav/server/org/apache/slide/webdav/util PropertyHelper.java VersioningHelper.java

pnever      02/05/08 09:04:34

  Modified:    src/share/org/apache/slide/content NodeProperty.java
                        NodeRevisionDescriptor.java
               src/webdav/server/org/apache/slide/webdav/method
                        CopyMethod.java MoveMethod.java
               src/webdav/server/org/apache/slide/webdav/util
                        PropertyHelper.java VersioningHelper.java
  Log:
  Introduced the property "kind" (dead, live, protected, computed) in NodeProperty.
  Remove field protectedProperty (now mapped onto Kind.PROTECTED).
  Removed two obsolete constrcutors.
  Adapted all other classes to the changes in NodeProperty.
  Reason for this change:
  Allows for proprietary live properties (which btw. should be in a separate namespace).
  
  Revision  Changes    Path
  1.10      +143 -34   jakarta-slide/src/share/org/apache/slide/content/NodeProperty.java
  
  Index: NodeProperty.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/content/NodeProperty.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- NodeProperty.java	25 Apr 2002 21:30:13 -0000	1.9
  +++ NodeProperty.java	8 May 2002 16:04:33 -0000	1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/content/NodeProperty.java,v 1.9 2002/04/25 21:30:13 jericho Exp $
  - * $Revision: 1.9 $
  - * $Date: 2002/04/25 21:30:13 $
  + * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/content/NodeProperty.java,v 1.10 2002/05/08 16:04:33 pnever Exp $
  + * $Revision: 1.10 $
  + * $Date: 2002/05/08 16:04:33 $
    *
    * ====================================================================
    *
  @@ -66,7 +66,13 @@
   import java.io.Serializable;
   import java.util.Vector;
   import java.util.Enumeration;
  +import java.util.Set;
  +
  +import java.lang.reflect.Method;
  +import java.lang.reflect.InvocationTargetException;
  +
   import org.apache.slide.security.NodePermission;
  +import org.apache.slide.util.Configuration;
   import org.apache.slide.util.Messages;
   import org.apache.slide.common.ObjectValidationFailedException;
   
  @@ -74,7 +80,7 @@
    * Node property class
    *
    * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
  - * @version $Revision: 1.9 $
  + * @version $Revision: 1.10 $
    */
   public final class NodeProperty implements Serializable, Cloneable {
       
  @@ -86,7 +92,27 @@
       public static final String SLIDE_NAMESPACE =
           "http://jakarta.apache.org/slide/";
       
  +    public static Set allLiveProperties;
  +    public static Set allProtectedProperties;
  +    public static Set allComputedProperties;
       
  +    static {
  +        Class standardLiveProperties = Configuration.standardLiveProperties();
  +        try {
  +            Method lp = standardLiveProperties.getMethod( "getAllLiveProperties", new Class[]{} );
  +            allLiveProperties = (Set)lp.invoke( null, new Object[]{} ); // obj=null since method is static
  +            Method pp = standardLiveProperties.getMethod( "getAllProtectedProperties", new Class[]{} );
  +            allProtectedProperties = (Set)pp.invoke( null, new Object[]{} ); // obj=null since method is static
  +            Method cp = standardLiveProperties.getMethod( "getAllComputedProperties", new Class[]{} );
  +            allComputedProperties = (Set)cp.invoke( null, new Object[]{} ); // obj=null since method is static
  +        }
  +        catch( NoSuchMethodException x ) {
  +        }
  +        catch( InvocationTargetException x ) {
  +        }
  +        catch( IllegalAccessException x ) {
  +        }
  +    }
       // ----------------------------------------------------------- Constructors
       
       
  @@ -101,21 +127,8 @@
           setValue(value);
           this.namespace = DEFAULT_NAMESPACE;
           this.type = new String();
  -        this.protectedProperty = false;
           this.permissions = new Vector();
  -    }
  -    
  -    
  -    /**
  -     * Constructor.
  -     *
  -     * @param name Name
  -     * @param value Value
  -     * @param standard Standard
  -     */
  -  public NodeProperty(String name, Object value, boolean protectedProperty) {
  -      this(name, value);
  -      this.protectedProperty = protectedProperty;
  +        this.kind = determineKind( namespace, name );
     }
       
       
  @@ -129,6 +142,7 @@
       public NodeProperty(String name, Object value, String namespace) {
           this(name, value);
           setNamespace(namespace);
  +        this.kind = determineKind( namespace, name );
       }
       
       
  @@ -138,14 +152,13 @@
        * @param name Name
        * @param value Value
        * @param namespace Namespace
  -     * @param type Type info
  -     * @param protectedProperty Protected property
  +     * @param type the type
        */
  -    public NodeProperty(String name, Object value, String namespace,
  -                        String type, boolean protectedProperty) {
  -        this(name, value, namespace);
  -        setType(type);
  -        this.protectedProperty = protectedProperty;
  +    public NodeProperty(String name, Object value, String namespace, String type) {
  +        this(name, value);
  +        setNamespace(namespace);
  +        this.type = type;
  +        this.kind = determineKind( namespace, name );
       }
       
       
  @@ -153,12 +166,6 @@
       
       
       /**
  -     * Standard.
  -     */
  -    private boolean protectedProperty;
  -    
  -    
  -    /**
        * Property name.
        */
       private String name;
  @@ -184,6 +191,10 @@
       private String type;
       
       
  +    /** The kind of property: dead, live, protected, computed */
  +    private Kind kind = Kind.DEAD;
  +    
  +    
       /**
        * Permission list.
        */
  @@ -192,14 +203,62 @@
       
       // ------------------------------------------------------------- Properties
       
  +    /**
  +     * Determine the kind of the property given by the specified namespace and name.
  +     */
  +    private static Kind determineKind( String namespace, String name ) {
  +        Kind result = Kind.DEAD;
  +
  +        if( DEFAULT_NAMESPACE.equals(namespace) ) {
  +            if( allComputedProperties.contains(name) )
  +                result = Kind.COMPUTED;
  +            else if( allProtectedProperties.contains(name) )
  +                result = Kind.PROTECTED;
  +            else if( allLiveProperties.contains(name) )
  +                result = Kind.LIVE;
  +        }
  +        return result;
  +    }
  +    
  +    /**
  +     * Kind accessor.
  +     *
  +     * @return true, if this is a dead property
  +     */
  +    public boolean isDeadProperty() {
  +        return( (this.kind == Kind.DEAD) );
  +    }
  +    
       
       /**
  -     * Protected accessor.
  +     * Kind accessor.
        *
  -     * @return boolean true
  +     * @return true, if this is a computed (live) property
  +     */
  +    public boolean isComputed() {
  +        return( (this.kind == Kind.COMPUTED) );
  +    }
  +    
  +    
  +    /**
  +     * Kind accessor.
  +     *
  +     * @return true, if this is a protected (live) property
        */
       public boolean isProtected() {
  -        return this.protectedProperty;
  +        return(
  +            (this.kind == Kind.PROTECTED) || (this.kind == Kind.COMPUTED) );
  +    }
  +    
  +    
  +    /**
  +     * Kind accessor.
  +     *
  +     * @return true, if this is a live property
  +     */
  +    public boolean isLiveProperty() {
  +        return(
  +            (this.kind == Kind.LIVE) || (this.kind == Kind.PROTECTED) || (this.kind == Kind.COMPUTED) );
       }
       
       
  @@ -300,6 +359,30 @@
       
       
       /**
  +     * Kind accessor.
  +     *
  +     * @return the property kind (dead, live, protected, computed)
  +     */
  +    public Kind getKind() {
  +        return kind;
  +    }
  +    
  +    
  +    /**
  +     * Kind mutator.
  +     *
  +     * @param kind the kind
  +     */
  +    public void setKind( Kind kind ) {
  +        if( kind == null ) {
  +            this.kind = Kind.DEAD;
  +        } else {
  +            this.kind = kind;
  +        }
  +    }
  +    
  +    
  +    /**
        * Add permission.
        *
        * @param permission Permission
  @@ -408,5 +491,31 @@
           
       }
       
  +    /**
  +     * The kind of a property: dead, live, protected, computed
  +     */
  +    public static class Kind {
  +        
  +        private static int
  +            DEAD_ID      = 0,
  +            LIVE_ID      = 1,
  +            PROTECTED_ID = 2,
  +            COMPUTED_ID  = 3;
  +        
  +        /** The discrete values */
  +        public static Kind
  +            DEAD         = new Kind( DEAD_ID ),
  +            LIVE         = new Kind( LIVE_ID ),
  +            PROTECTED    = new Kind( PROTECTED_ID ),
  +            COMPUTED     = new Kind( COMPUTED_ID );
  +        
  +        private int id = 0;
       
  +        /**
  +         * Private constructor
  +         */
  +        private Kind( int id ) {
  +            this.id = id;
  +        }
  +    }
   }
  
  
  
  1.26      +19 -32    jakarta-slide/src/share/org/apache/slide/content/NodeRevisionDescriptor.java
  
  Index: NodeRevisionDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/content/NodeRevisionDescriptor.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- NodeRevisionDescriptor.java	25 Apr 2002 21:30:13 -0000	1.25
  +++ NodeRevisionDescriptor.java	8 May 2002 16:04:33 -0000	1.26
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/content/NodeRevisionDescriptor.java,v 1.25 2002/04/25 21:30:13 jericho Exp $
  - * $Revision: 1.25 $
  - * $Date: 2002/04/25 21:30:13 $
  + * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/content/NodeRevisionDescriptor.java,v 1.26 2002/05/08 16:04:33 pnever Exp $
  + * $Revision: 1.26 $
  + * $Date: 2002/05/08 16:04:33 $
    *
    * ====================================================================
    *
  @@ -81,7 +81,7 @@
    * Node Revision Descriptor class.
    *
    * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
  - * @version $Revision: 1.25 $
  + * @version $Revision: 1.26 $
    */
   public final class NodeRevisionDescriptor implements Serializable, Cloneable {
       
  @@ -427,18 +427,6 @@
       
       
       /**
  -     * Property mutator.
  -     *
  -     * @param name Property name
  -     * @param value Property value
  -     * @param standard True if one of the standard properties
  -     */
  -    protected void setProperty(String name, Object value, boolean standard) {
  -        setProperty(new NodeProperty(name, value, standard));
  -    }
  -    
  -    
  -    /**
        * Property mutatory.
        *
        * @param property Property
  @@ -599,7 +587,7 @@
        * @param name New name
        */
       public void setName(String name) {
  -        setProperty(NAME, "<![CDATA[" + name + "]]>", false);  // live property, but can be modified
  +        setProperty(NAME, "<![CDATA[" + name + "]]>");  // live property, but can be modified
       }
       
       
  @@ -624,7 +612,7 @@
        * @param eTag  New etag
        */
       public void setETag(String eTag) {
  -        setProperty(ETAG, eTag, true);  // live property, can not be modified
  +        setProperty(ETAG, eTag);  // live property, can not be modified
       }
       
       
  @@ -652,7 +640,7 @@
        * @param eTag  New etag
        */
       public void setOwner(String owner) {
  -        setProperty(OWNER, owner, true);  // live property, can not be modified
  +        setProperty(OWNER, owner);  // live property, can not be modified
       }
       
       /**
  @@ -661,7 +649,7 @@
        * @param eTag  New etag
        */
       public void setOwner(String owner, String userpath) {
  -        setProperty(OWNER, userpath + "/" + owner, true);  // live property, can not be modified
  +        setProperty(OWNER, userpath + "/" + owner);  // live property, can not be modified
       }
       
       /**
  @@ -685,7 +673,7 @@
        * @param eTag  New etag
        */
       public void setSource(String source) {
  -        setProperty(SOURCE, source, true);  // live property, can not be modified
  +        setProperty(SOURCE, source);  // live property, can not be modified
       }
       
       
  @@ -714,7 +702,7 @@
        * @param ResourceType  New ResourceType
        */
       public void setResourceType(String resourceType) {
  -        setProperty(RESOURCE_TYPE, resourceType, true);  // live property, can not be modified
  +        setProperty(RESOURCE_TYPE, resourceType);  // live property, can not be modified
       }
       
       
  @@ -741,7 +729,7 @@
        * @param contentType New content type
        */
       public void setContentType(String contentType) {
  -        setProperty(CONTENT_TYPE, contentType, true);  // live property, can not be modified
  +        setProperty(CONTENT_TYPE, contentType);  // live property, can not be modified
       }
       
       
  @@ -766,7 +754,7 @@
        * @param contentLanguage New content language
        */
       public void setContentLanguage(String contentLanguage) {
  -        setProperty(CONTENT_LANGUAGE, contentLanguage, true);  // live property, can not be modified
  +        setProperty(CONTENT_LANGUAGE, contentLanguage);  // live property, can not be modified
       }
       
       
  @@ -825,8 +813,7 @@
        */
       public void setCreationDate(Date creationDate) {
           // live property, can not be modified
  -        setProperty(
  -            CREATION_DATE, creationDateFormat.format(creationDate), true);
  +        setProperty(CREATION_DATE, creationDateFormat.format(creationDate));
       }
       
       
  @@ -836,7 +823,7 @@
        * @param creationDate New creation date
        */
       public void setCreationDate(String creationDate) {
  -        setProperty(CREATION_DATE, creationDate, true);  // live property, can not be modified
  +        setProperty(CREATION_DATE, creationDate);  // live property, can not be modified
       }
       
       
  @@ -895,7 +882,7 @@
        */
       public void setLastModified(Date lastModified) {
           // live property, can not be modified
  -        setProperty(LAST_MODIFIED, format.format(lastModified), true);
  +        setProperty(LAST_MODIFIED, format.format(lastModified));
       }
       
       
  @@ -905,7 +892,7 @@
        * @param lastModified New last modified
        */
       public void setLastModified(String lastModified) {
  -        setProperty(LAST_MODIFIED, lastModified, true);   // live property, can not be modified
  +        setProperty(LAST_MODIFIED, lastModified);   // live property, can not be modified
       }
       
       
  @@ -915,7 +902,7 @@
        * @param creationLength New content length
        */
       public void setContentLength(long contentLength) {
  -        setProperty(CONTENT_LENGTH, new Long(contentLength), true);  // live property, can not be modified
  +        setProperty(CONTENT_LENGTH, new Long(contentLength));  // live property, can not be modified
       }
       
       
  @@ -934,7 +921,7 @@
           if (contentLengthValue == null) {
               contentLengthValue = new Long(0);
           }
  -        setProperty(CONTENT_LENGTH, contentLengthValue, true);  // live property, can not be modified
  +        setProperty(CONTENT_LENGTH, contentLengthValue);  // live property, can not be modified
       }
       
       
  @@ -988,7 +975,7 @@
           setName("");
           // By default, a resource is a collection
           setResourceType("<collection/>");
  -        setProperty(SOURCE, "", true);  // live property, can not be modified
  +        setProperty(SOURCE, "");  // live property, can not be modified
           setContentLength(-1);
           setLastModified(new Date());
           
  
  
  
  1.33      +5 -5      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.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- CopyMethod.java	7 May 2002 07:34:57 -0000	1.32
  +++ CopyMethod.java	8 May 2002 16:04:33 -0000	1.33
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CopyMethod.java,v 1.32 2002/05/07 07:34:57 juergen Exp $
  - * $Revision: 1.32 $
  - * $Date: 2002/05/07 07:34:57 $
  + * $Header: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CopyMethod.java,v 1.33 2002/05/08 16:04:33 pnever Exp $
  + * $Revision: 1.33 $
  + * $Date: 2002/05/08 16:04:33 $
    *
    * ====================================================================
    *
  @@ -372,8 +372,8 @@
                   }
                   // restore <checked-out> property
                   if (checkedOutPropertyValue != null) {
  -                    destinationRevisionDescriptor.setProperty(new NodeProperty(P_CHECKED_OUT,
  -                                                                    checkedOutPropertyValue, true));
  +                    destinationRevisionDescriptor.setProperty(
  +                        new NodeProperty(P_CHECKED_OUT, checkedOutPropertyValue) );
                   }
                   // set <workspace> property
                   versioningHelper.setWorkspaceProperty(destinationUri, destinationRevisionDescriptor);
  
  
  
  1.37      +5 -4      jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/MoveMethod.java
  
  Index: MoveMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/MoveMethod.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- MoveMethod.java	8 May 2002 07:23:21 -0000	1.36
  +++ MoveMethod.java	8 May 2002 16:04:33 -0000	1.37
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/MoveMethod.java,v 1.36 2002/05/08 07:23:21 juergen Exp $
  - * $Revision: 1.36 $
  - * $Date: 2002/05/08 07:23:21 $
  + * $Header: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/MoveMethod.java,v 1.37 2002/05/08 16:04:33 pnever Exp $
  + * $Revision: 1.37 $
  + * $Date: 2002/05/08 16:04:33 $
    *
    * ====================================================================
    *
  @@ -523,7 +523,8 @@
               
               if (isRequestSourceWorkspace) {
               // DAV:workspace-moved
  -            revisionDescriptor.setProperty(new NodeProperty(P_WORKSPACE, propertyHelper.createHrefValue(this.destinationUri), true));
  +                revisionDescriptor.setProperty(
  +                    new NodeProperty( P_WORKSPACE, propertyHelper.createHrefValue(this.destinationUri)) );
           }
           else {
               // DAV:workspace-member-moved
  
  
  
  1.19      +6 -7      jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java
  
  Index: PropertyHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- PropertyHelper.java	8 May 2002 08:24:20 -0000	1.18
  +++ PropertyHelper.java	8 May 2002 16:04:33 -0000	1.19
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java,v 1.18 2002/05/08 08:24:20 juergen Exp $
  - * $Revision: 1.18 $
  - * $Date: 2002/05/08 08:24:20 $
  + * $Header: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java,v 1.19 2002/05/08 16:04:33 pnever Exp $
  + * $Revision: 1.19 $
  + * $Date: 2002/05/08 16:04:33 $
    *
    * ====================================================================
    *
  @@ -101,12 +101,12 @@
   import org.apache.slide.search.BadQueryException;
   
   /**
  - * Helper class for handling WebDAV resources.
  + * Helper class for handling WebDAV properties.
    *
    * @author <a href="mailto:peter.nevermann@softwareag.com">Peter Nevermann</a>
    */
   
  -public class PropertyHelper extends AbstractWebdavHelper implements DeltavConstants {
  +public class PropertyHelper extends AbstractWebdavHelper implements DeltavConstants, AclConstants, DaslConstants {
       
       
       /**
  @@ -173,8 +173,7 @@
                   if( AbstractResourceKind.isComputedProperty(propName) )
                       continue;
                   Object pvalue = createDefaultValue( propName, resourceKind );
  -                result.add( new NodeProperty( propName, pvalue,
  -                    AbstractResourceKind.isProtectedProperty(propName)) );
  +                result.add( new NodeProperty(propName, pvalue) );
               }
           }
           return result;
  
  
  
  1.46      +13 -22    jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/VersioningHelper.java
  
  Index: VersioningHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/VersioningHelper.java,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- VersioningHelper.java	3 May 2002 16:35:08 -0000	1.45
  +++ VersioningHelper.java	8 May 2002 16:04:33 -0000	1.46
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/VersioningHelper.java,v 1.45 2002/05/03 16:35:08 pnever Exp $
  - * $Revision: 1.45 $
  - * $Date: 2002/05/03 16:35:08 $
  + * $Header: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/VersioningHelper.java,v 1.46 2002/05/08 16:04:33 pnever Exp $
  + * $Revision: 1.46 $
  + * $Date: 2002/05/08 16:04:33 $
    *
    * ====================================================================
    *
  @@ -317,7 +317,7 @@
           j = rNrd.enumerateProperties();
           while( j.hasMoreElements() ) {
               NodeProperty p = (NodeProperty)j.nextElement();
  -            if( rRk.isSupportedLiveProperty(p.getName()) )
  +            if( p.isLiveProperty() )
                   continue;
               if( !vrNrd.exists(p.getName()) )
                   vrNrd.setProperty( p );
  @@ -676,9 +676,10 @@
               if (isAutoVersionCheckout) {
                   NodeLock writeLock = getWriteLock(sToken, rNrds);
                   if (writeLock != null) {
  -                    rNrd.setProperty(new NodeProperty(VersioningHelper.P_CHECKIN_LOCKTOKEN,
  -                                                      writeLock.getLockId(),
  -                                                      true));
  +                    NodeProperty p =
  +                        new NodeProperty( VersioningHelper.P_CHECKIN_LOCKTOKEN, writeLock.getLockId() );
  +                    p.setKind( NodeProperty.Kind.PROTECTED );
  +                    rNrd.setProperty( p );
                   }
               }
               
  @@ -780,7 +781,7 @@
               j = rNrd.enumerateProperties();
               while( j.hasMoreElements() ) {
                   NodeProperty p = (NodeProperty)j.nextElement();
  -                if( rRk.isSupportedLiveProperty(p.getName()) )
  +                if( p.isLiveProperty() )
                       continue;
                   wrNrd.setProperty( p );
               }
  @@ -1008,7 +1009,7 @@
               j = rNrd.enumerateProperties();
               while( j.hasMoreElements() ) {
                   NodeProperty p = (NodeProperty)j.nextElement();
  -                if( rRk.isSupportedLiveProperty(p.getName()) )
  +                if( p.isLiveProperty() )
                       continue;
                   if( !vrNrdNew.exists(p.getName()) )
                       vrNrdNew.setProperty( p );
  @@ -1035,7 +1036,7 @@
                       rNrd.removeProperty( coutProp );
                       rNrd.setProperty(
                           new NodeProperty(P_CHECKED_IN, pHelp.createHrefValue(vrUriNew)) );
  -                    rNrd.removeProperty(new NodeProperty(VersioningHelper.P_CHECKIN_LOCKTOKEN, null, true));
  +                    rNrd.removeProperty( VersioningHelper.P_CHECKIN_LOCKTOKEN );
                       rNrd.removeProperty(P_PREDECESSOR_SET);
                       rNrd.removeProperty(P_CHECKOUT_FORK);
                       rNrd.removeProperty(P_CHECKIN_FORK);
  @@ -1233,29 +1234,19 @@
           Enumeration propertyEnum;
           
           // Remove all VCR dead properties first
  -        // Well, almost all ... a property named xdavContentId will be skipped ...
  -        // This is a TEMPORARY Tamino-specific workaround which shouldn't hurt others.
  -        // Sorry for this :-) !!
           propertyEnum = vcrRevisionDescriptor.enumerateProperties();
           while (propertyEnum.hasMoreElements()) {
               NodeProperty p = (NodeProperty)propertyEnum.nextElement();
  -            if( cinvcrResourceKind.isSupportedLiveProperty(p.getName()) )
  -                continue;
  -            if( p.getName().equals("xdavContentId") )
  +            if( p.isLiveProperty() )
                   continue;
               vcrRevisionDescriptor.removeProperty(p);
           }
           
           // Copy all dead properties of VR to VCR
  -        // Well, almost all ... a property named xdavContentId will be skipped ...
  -        // Again, this is TEMPORARAY and shouldn't hurt others.
  -        // Sorry again for this :-) !!
           propertyEnum = vrRevisionDescriptor.enumerateProperties();
           while (propertyEnum.hasMoreElements()) {
               NodeProperty p = (NodeProperty)propertyEnum.nextElement();
  -            if( p.getName().equals("xdavContentId") )
  -                continue;
  -            if( ! vrResourceKind.isSupportedLiveProperty(p.getName()) ) {
  +            if( !p.isLiveProperty() ) {
                   vcrRevisionDescriptor.setProperty(p);
               }
           }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>