luetzkendorf    2004/12/29 08:39:20

  Modified:    src/webdav/server/org/apache/slide/webdav/util
                        PropertyHelper.java
  Log:
  References to PropertyManager removed
  
  Revision  Changes    Path
  1.88      +12 -8     
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.87
  retrieving revision 1.88
  diff -u -r1.87 -r1.88
  --- PropertyHelper.java       21 Dec 2004 16:17:04 -0000      1.87
  +++ PropertyHelper.java       29 Dec 2004 16:39:19 -0000      1.88
  @@ -50,11 +50,11 @@
   import org.apache.slide.webdav.WebdavServletConfig;
   import org.apache.slide.webdav.util.properties.LockDiscoveryProperty;
   import org.apache.slide.webdav.util.properties.PropertyComputer;
  -import org.apache.slide.webdav.util.properties.PropertyManager;
   import org.apache.slide.webdav.util.resourcekind.AbstractResourceKind;
   import org.apache.slide.webdav.util.resourcekind.Activity;
   import org.apache.slide.webdav.util.resourcekind.DeltavCompliantCollection;
   import org.apache.slide.webdav.util.resourcekind.ResourceKind;
  +import org.apache.slide.webdav.util.resourcekind.ResourceKindManager;
   import org.apache.slide.webdav.util.resourcekind.VersionHistory;
   import org.jdom.Attribute;
   import org.jdom.Document;
  @@ -531,12 +531,16 @@
        * @throws   SlideException
        * @throws   JDOMException
        */
  -    public NodeProperty computeProperty(String propertyName, 
NodeRevisionDescriptors revisionDescriptors, NodeRevisionDescriptor 
revisionDescriptor, String slideContextPath) throws SlideException, 
JDOMException {
  +    public NodeProperty computeProperty(String propertyName, 
  +            NodeRevisionDescriptors revisionDescriptors, 
  +            NodeRevisionDescriptor revisionDescriptor, 
  +            String slideContextPath) throws SlideException, JDOMException 
  +    {
           
  -        PropertyManager manager = PropertyManager.getInstance();
  +        ResourceKind resourceKind = 
ResourceKindManager.determineResourceKind(
  +                this.nsaToken, revisionDescriptors, revisionDescriptor);
           
  -        PropertyComputer definition = manager.getComputedProperty(
  -                PropertyName.getPropertyName(propertyName));
  +        PropertyComputer definition = 
resourceKind.getPropertyComputer(propertyName);
   
           if (this.webdavContext == null) {
               this.webdavContext = WebdavContextImpl.create(this.sToken, 
  @@ -547,7 +551,7 @@
               Object value = definition.computeValue(this.nsaToken, 
                       revisionDescriptors, 
                       revisionDescriptor, 
  -                    this.webdavContext );
  +                    this.webdavContext);
           
               if (value != null) {
                   return new NodeProperty(definition.getPropertyName(), value);
  @@ -556,7 +560,7 @@
               }
           }
           
  -        throw new SlideException("Unknow property" + propertyName);
  +        throw new SlideException("Unknown property" + propertyName);
           
   //        NodeProperty property = null;
   //        if (P_SUCCESSOR_SET.equals(propertyName)) {
  @@ -2123,7 +2127,7 @@
           
           NodeProperty property = revisionDescriptor.getProperty(propertyName);
           if (property == null) {
  -            property = new NodeProperty(propertyName, null);
  +            property = new NodeProperty(propertyName, "");
           }
           XMLValue xmlValue = new XMLValue((String)property.getValue());
           Iterator iterator = xmlValue.iterator();
  
  
  

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

Reply via email to