tdraier     2004/11/10 11:47:58 CET

  Modified files:
    core/src/java/org/jahia/services/webdav/stores 
                                                   FileContentStore.java 
                                                   UsersDescriptorsStore.java 
    core                 project.xml 
    core/src/java/org/apache/slide/common JahiaDomain.java 
  Log:
  updates for slide 2 - fixed bug at domain initialization
  
  Revision  Changes    Path
  1.32      +7 -7      jahia/core/project.xml
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/project.xml.diff?r1=1.31&r2=1.32&f=h
  1.2       +8 -20     
jahia/core/src/java/org/apache/slide/common/JahiaDomain.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/java/org/apache/slide/common/JahiaDomain.java.diff?r1=1.1&r2=1.2&f=h
  1.3       +26 -9     
jahia/core/src/java/org/jahia/services/webdav/stores/FileContentStore.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/java/org/jahia/services/webdav/stores/FileContentStore.java.diff?r1=1.2&r2=1.3&f=h
  1.3       +4 -2      
jahia/core/src/java/org/jahia/services/webdav/stores/UsersDescriptorsStore.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/java/org/jahia/services/webdav/stores/UsersDescriptorsStore.java.diff?r1=1.2&r2=1.3&f=h
  
  
  
  Index: FileContentStore.java
  ===================================================================
  RCS file: 
/home/cvs/repository/jahia/core/src/java/org/jahia/services/webdav/stores/FileContentStore.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FileContentStore.java     17 Sep 2004 10:14:50 -0000      1.2
  +++ FileContentStore.java     10 Nov 2004 10:47:57 -0000      1.3
  @@ -1,12 +1,13 @@
   package org.jahia.services.webdav.stores;
   
  -import org.apache.slide.common.NamespaceAccessToken;
  -import org.apache.slide.common.ServiceInitializationFailedException;
  -import org.apache.slide.common.ServiceDisconnectionFailedException;
  -import org.apache.slide.common.ServiceConnectionFailedException;
  -import org.apache.slide.store.txfile.TxFileContentStore;
  +import org.apache.slide.common.*;
  +import org.apache.slide.store.file.SimpleFileStore;
  +import org.apache.slide.content.NodeRevisionDescriptor;
  +import org.apache.slide.content.NodeRevisionContent;
  +import org.apache.slide.content.RevisionAlreadyExistException;
   
   import java.util.Hashtable;
  +import java.io.File;
   
   /**
    * Created by IntelliJ IDEA.
  @@ -15,10 +16,12 @@
    * Time: 10:25:09 PM
    * To change this template use Options | File Templates.
    */
  -public class FileContentStore extends TxFileContentStore {
  +public class FileContentStore extends SimpleFileStore {
   
       private static String contentPath;
   
  +    private String path;
  +
       public static void setContentPath (String contentPath) {
           FileContentStore.contentPath = contentPath;
       }
  @@ -30,14 +33,28 @@
       public synchronized void initialize (NamespaceAccessToken token)
               throws ServiceInitializationFailedException {
           Hashtable parameters = new Hashtable ();
  -        parameters.put (STORE_DIR_PARAMETER, contentPath + "/store_" + 
token.getName ());
  -        parameters.put (WORK_DIR_PARAMETER, contentPath + "/work_" + 
token.getName ());
  +        path =  contentPath + "/store_" + token.getName ();
  +        parameters.put ("rootpath", path);
  +        new File(path).mkdirs();
  +//        parameters.put (WORK_DIR_PARAMETER, contentPath + "/work_" + 
token.getName ());
           try {
               setParameters (parameters);
  -            started = false;
  +//            started = false;
           } catch (Exception e) {
           e.printStackTrace();
           }
           super.initialize (token);
       }
  +
  +    public void createRevisionContent(Uri uri, NodeRevisionDescriptor 
revisionDescriptor, NodeRevisionContent revisionContent) throws 
ServiceAccessException, RevisionAlreadyExistException {
  +        new File(path, uri.getParentUri().getRelative()).mkdirs();
  +        super.createRevisionContent(uri, revisionDescriptor, 
revisionContent);
  +    }
  +
  +    public void setParameters(Hashtable parameters) throws 
ServiceParameterErrorException, ServiceParameterMissingException {
  +        try {
  +            super.setParameters(parameters);
  +        } catch (ServiceParameterErrorException e) {
  +        }
  +    }
   }
  
  
  
  Index: UsersDescriptorsStore.java
  ===================================================================
  RCS file: 
/home/cvs/repository/jahia/core/src/java/org/jahia/services/webdav/stores/UsersDescriptorsStore.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- UsersDescriptorsStore.java        17 Sep 2004 10:14:50 -0000      1.2
  +++ UsersDescriptorsStore.java        10 Nov 2004 10:47:57 -0000      1.3
  @@ -692,8 +692,10 @@
                   // Load each permission
                   String folder = res.getString (1);
                   folder = folder.substring (folder.indexOf ('/', 1) + 1);
  -                folder = folder.substring (0, folder.indexOf ('/'));
  -                s.add (folder);
  +                if (folder.indexOf('/') != -1) {
  +                    folder = folder.substring (0, folder.indexOf ('/'));
  +                    s.add (folder);
  +                }
               }
           } catch (SQLException e) {
               getLogger ().log (e, LOG_CHANNEL, Logger.ERROR);
  
  
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/repository/jahia/core/project.xml,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- project.xml       24 Sep 2004 15:21:47 -0000      1.31
  +++ project.xml       10 Nov 2004 10:47:57 -0000      1.32
  @@ -234,7 +234,7 @@
       <dependency>
         <groupId>jdom</groupId>
         <artifactId>jdom</artifactId>
  -      <version>b10</version>
  +      <version>1.0</version>
         <properties>
           <war.bundle>true</war.bundle>
         </properties>
  @@ -632,7 +632,7 @@
       <dependency>
         <groupId>slide</groupId>
         <artifactId>slide-kernel</artifactId>
  -      <version>2.1b1</version>
  +      <version>2.2pre1</version>
         <properties>
           <war.bundle>true</war.bundle>
         </properties>
  @@ -641,7 +641,7 @@
       <dependency>
         <groupId>slide</groupId>
         <artifactId>slide-roles</artifactId>
  -      <version>2.1b1</version>
  +      <version>2.2pre1</version>
         <properties>
           <war.bundle>true</war.bundle>
         </properties>
  @@ -650,7 +650,7 @@
       <dependency>
         <groupId>slide</groupId>
         <artifactId>slide-stores</artifactId>
  -      <version>2.1b1</version>
  +      <version>2.2pre1</version>
         <properties>
           <war.bundle>true</war.bundle>
         </properties>
  @@ -659,7 +659,7 @@
       <dependency>
         <groupId>slide</groupId>
         <artifactId>jakarta-slide-webdavlib</artifactId>
  -      <version>2.1b1</version>
  +      <version>2.2pre1</version>
         <properties>
           <war.bundle>true</war.bundle>
         </properties>
  @@ -668,7 +668,7 @@
       <dependency>
         <groupId>slide</groupId>
         <artifactId>slide-webdavservlet</artifactId>
  -      <version>2.1b1</version>
  +      <version>2.2pre1</version>
         <properties>
           <war.bundle>true</war.bundle>
         </properties>
  @@ -676,7 +676,7 @@
       <dependency>
         <groupId>slide</groupId>
         <artifactId>slide-log4jlogger</artifactId>
  -      <version>2.1b1</version>
  +      <version>2.2pre1</version>
         <properties>
           <war.bundle>true</war.bundle>
         </properties>
  
  
  
  Index: JahiaDomain.java
  ===================================================================
  RCS file: 
/home/cvs/repository/jahia/core/src/java/org/apache/slide/common/JahiaDomain.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JahiaDomain.java  17 Sep 2004 10:14:48 -0000      1.1
  +++ JahiaDomain.java  10 Nov 2004 10:47:57 -0000      1.2
  @@ -15,10 +15,10 @@
    * Time: 17:23:47
    * <p/>
    * $Author: tdraier $
  - * $Date: 2004/09/17 10:14:48 $
  - * $Id: JahiaDomain.java,v 1.1 2004/09/17 10:14:48 tdraier Exp $
  + * $Date: 2004/11/10 10:47:57 $
  + * $Id: JahiaDomain.java,v 1.2 2004/11/10 10:47:57 tdraier Exp $
    * $RCSfile: JahiaDomain.java,v $
  - * $Revision: 1.1 $
  + * $Revision: 1.2 $
    * $Source: 
/home/cvs/repository/jahia/core/src/java/org/apache/slide/common/JahiaDomain.java,v
 $
    * $State: Exp $
    */
  @@ -51,19 +51,7 @@
               Domain.init(configuration);
           } catch (DomainInitializationFailedError e) {
           }
  -        Domain.setInitialized(true);
  -        Enumeration extractorConfigurations = 
configuration.getConfigurations("extractors");
  -        if ( extractorConfigurations.hasMoreElements() ) {
  -            Configuration extractorConfiguration = 
(Configuration)extractorConfigurations.nextElement();
  -            ExtractorManager.getInstance().configure(extractorConfiguration);
  -        }
  -
  -        Enumeration eventConfigurations = 
configuration.getConfigurations("events");
  -        if ( eventConfigurations.hasMoreElements() ) {
  -            Configuration eventConfiguration = 
(Configuration)eventConfigurations.nextElement();
  -            EventDispatcher.getInstance().configure(eventConfiguration);
  -        }
  -
  +//        Domain.setInitialized(true);
       }
   
       /**
  

Reply via email to