luetzkendorf    2004/12/29 08:44:04

  Modified:    src/webdav/server/org/apache/slide/webdav/util
                        VersioningHelper.java
  Log:
  Use of NodeProperty.isLiveProperty replaced by 
ResourceKind.isSupportedLiveProperty.
  "Live", "Protected", "Dead", "Computed" are concepts of the webdav layer and 
should used there.
  (The NodeProperty.kind is determined by a hack that queries the webdav layer 
indirectly.
  I would vote for removing this.)
  
  Revision  Changes    Path
  1.114     +12 -5     
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.113
  retrieving revision 1.114
  diff -u -r1.113 -r1.114
  --- VersioningHelper.java     21 Dec 2004 16:17:04 -0000      1.113
  +++ VersioningHelper.java     29 Dec 2004 16:44:04 -0000      1.114
  @@ -265,7 +265,8 @@
           j = rNrd.enumerateProperties();
           while( j.hasMoreElements() ) {
               NodeProperty p = (NodeProperty)j.nextElement();
  -            if( p.isLiveProperty() )
  +            //if( p.isLiveProperty() )
  +            if (rRk.isSupportedLiveProperty(p.getPropertyName()))
                   continue;
               if( !vrNrd.exists(p.getPropertyName()) )
                   vrNrd.setProperty( p );
  @@ -905,7 +906,8 @@
               j = rNrd.enumerateProperties();
               while( j.hasMoreElements() ) {
                   NodeProperty p = (NodeProperty)j.nextElement();
  -                if( p.isLiveProperty() )
  +                //if( p.isLiveProperty() )
  +                if (rRk.isSupportedLiveProperty(p.getPropertyName()))
                       continue;
                   wrNrd.setProperty( p );
               }
  @@ -1199,7 +1201,8 @@
               j = rNrd.enumerateProperties();
               while( j.hasMoreElements() ) {
                   NodeProperty p = (NodeProperty)j.nextElement();
  -                if( p.isLiveProperty() )
  +                //if( p.isLiveProperty() )
  +                if (rRk.isSupportedLiveProperty(p.getPropertyName()))
                       continue;
                   if( !vrNrdNew.exists(p.getPropertyName()))
                       vrNrdNew.setProperty( p );
  @@ -1528,12 +1531,15 @@
           //ResourceKind cinvcrResourceKind = 
CheckedInVersionControlledImpl.getInstance();
           String vcrUri = getUri(vcrRevisionDescriptors, 
vcrRevisionDescriptor);
           Enumeration propertyEnum;
  +        ResourceKind resourceKind = 
AbstractResourceKind.determineResourceKind( 
  +                nsaToken, vcrRevisionDescriptors, vcrRevisionDescriptor);
           
           // Remove all VCR dead properties first
           propertyEnum = vcrRevisionDescriptor.enumerateProperties();
           while (propertyEnum.hasMoreElements()) {
               NodeProperty p = (NodeProperty)propertyEnum.nextElement();
  -            if( p.isLiveProperty() )
  +            //if( p.isLiveProperty() )
  +            if (resourceKind.isSupportedLiveProperty(p.getPropertyName()))
                   continue;
               vcrRevisionDescriptor.removeProperty(p);
           }
  @@ -1542,7 +1548,8 @@
           propertyEnum = vrRevisionDescriptor.enumerateProperties();
           while (propertyEnum.hasMoreElements()) {
               NodeProperty p = (NodeProperty)propertyEnum.nextElement();
  -            if( !p.isLiveProperty() ) {
  +            //if( !p.isLiveProperty() ) {
  +            if (resourceKind.isSupportedLiveProperty(p.getPropertyName())) {
                   vcrRevisionDescriptor.setProperty(p);
               }
           }
  
  
  

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

Reply via email to