portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager CastorPsmlManagerService.java
Date Thu, 16 May 2002 22:07:32 GMT
taylor      02/05/16 15:07:32

  Modified:    src/java/org/apache/jetspeed/services/psmlmanager
                        CastorPsmlManagerService.java
  Log:
  Fixed bug in Castor PSML Service to only create a new file on save, not on load
  
  Revision  Changes    Path
  1.22      +19 -6     jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/CastorPsmlManagerService.java
  
  Index: CastorPsmlManagerService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/CastorPsmlManagerService.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- CastorPsmlManagerService.java	16 May 2002 20:00:43 -0000	1.21
  +++ CastorPsmlManagerService.java	16 May 2002 22:07:32 -0000	1.22
  @@ -118,7 +118,7 @@
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
    * @author <a href="mailto:sgala@apache.org">Santiago Gala</a>
  - * @version $Id: CastorPsmlManagerService.java,v 1.21 2002/05/16 20:00:43 taylor Exp $
  + * @version $Id: CastorPsmlManagerService.java,v 1.22 2002/05/16 22:07:32 taylor Exp $
    */
   public class CastorPsmlManagerService extends TurbineBaseService
       implements PsmlManagerService
  @@ -521,6 +521,18 @@
           
           if (doc == null) return false;
           File f = getFile(fileOrUrl);
  +
  +        if (f == null)
  +        {
  +            String path = TurbineServlet.getRealPath(fileOrUrl);
  +            if (null == path)
  +            {
  +                path = fileOrUrl;
  +            }    
  +            f = new File(path);
  +        }
  +
  +
           FileWriter writer = null;
   
           try
  @@ -637,7 +649,8 @@
           if (f.exists())
           {
               return f;
  -        }
  +        }          
  +/*
           else        
           {
               // try as a relative path
  @@ -653,7 +666,6 @@
                   return f;
               }
   
  -/*            
               // try through the disk cache
               try
               {
  @@ -663,10 +675,11 @@
               {
                   Log.error("PSMLManager: unabel to retrieve file from diskcache for "+fileOrUrl,e);
               }
  -*/            
  -        }
  -
  +            
  +        }           
           return f;
  +*/
  +        return null;
       }    
       
       protected class DocumentWatcher extends Thread
  
  
  

--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message