jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r289196 - in /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core: RepositoryImpl.java config/SearchConfig.java config/WorkspaceConfig.java
Date Thu, 15 Sep 2005 10:35:35 GMT
Author: mreutegg
Date: Thu Sep 15 03:35:29 2005
New Revision: 289196

URL: http://svn.apache.org/viewcvs?rev=289196&view=rev
Log:
- Allow for better extensibility.

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/config/SearchConfig.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/config/WorkspaceConfig.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java?rev=289196&r1=289195&r2=289196&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java Thu
Sep 15 03:35:29 2005
@@ -185,7 +185,7 @@
         Iterator iter = repConfig.getWorkspaceConfigs().iterator();
         while (iter.hasNext()) {
             WorkspaceConfig config = (WorkspaceConfig) iter.next();
-            WorkspaceInfo info = new WorkspaceInfo(config);
+            WorkspaceInfo info = createWorkspaceInfo(config);
             wspInfos.put(config.getName(), info);
         }
 
@@ -229,7 +229,7 @@
             }
         });
     }
-    
+
     /**
      * Lock the repository home.
      * @throws RepositoryException
@@ -540,7 +540,7 @@
 
         // create the workspace configuration
         WorkspaceConfig config = repConfig.createWorkspaceConfig(workspaceName);
-        WorkspaceInfo info = new WorkspaceInfo(config);
+        WorkspaceInfo info = createWorkspaceInfo(config);
         wspInfos.put(workspaceName, info);
 
         // setup/initialize new workspace
@@ -1026,6 +1026,17 @@
         return new XASessionImpl(this, subject, wspConfig);
     }
 
+    /**
+     * Creates a new {@link RepositoryImpl.WorkspaceInfo} instance for
+     * <code>wspConfig</code>.
+     *
+     * @param wspConfig the workspace configuration.
+     * @return a new <code>WorkspaceInfo</code> instance.
+     */
+    protected WorkspaceInfo createWorkspaceInfo(WorkspaceConfig wspConfig) {
+        return new WorkspaceInfo(wspConfig);
+    }
+
     //--------------------------------------------------------< inner classes >
     /**
      * <code>WorkspaceInfo</code> holds the objects that are shared
@@ -1076,7 +1087,7 @@
          *
          * @param config workspace configuration
          */
-        WorkspaceInfo(WorkspaceConfig config) {
+        protected WorkspaceInfo(WorkspaceConfig config) {
             this.config = config;
         }
 

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/config/SearchConfig.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/config/SearchConfig.java?rev=289196&r1=289195&r2=289196&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/config/SearchConfig.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/config/SearchConfig.java
Thu Sep 15 03:35:29 2005
@@ -46,7 +46,7 @@
      * @param fsc search index file system configuration, or <code>null</code>
      *   if none is configured.
      */
-    SearchConfig(
+    public SearchConfig(
             String className, Properties properties, FileSystemConfig fsc) {
         super(className, properties);
         this.fsc = fsc;
@@ -83,6 +83,16 @@
             return null;
         }
         return fsc.getFileSystem();
+    }
+
+    /**
+     * Returns the configuration for the <code>FileSystem</code> or
+     * <code>null</code> if none is configured in this <code>SearchConfig</code>.
+     *
+     * @return the <code>FileSystemConfig</code> for this <code>SearchConfig</code>.
+     */
+    public FileSystemConfig getFileSystemConfig() {
+        return fsc;
     }
 
 }

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/config/WorkspaceConfig.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/config/WorkspaceConfig.java?rev=289196&r1=289195&r2=289196&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/config/WorkspaceConfig.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/config/WorkspaceConfig.java
Thu Sep 15 03:35:29 2005
@@ -63,7 +63,7 @@
      * @param pmc persistence manager configuration
      * @param sc search index configuration
      */
-    WorkspaceConfig(String home, String name, FileSystemConfig fsc,
+    public WorkspaceConfig(String home, String name, FileSystemConfig fsc,
             PersistenceManagerConfig pmc, SearchConfig sc) {
         this.home = home;
         this.name = name;
@@ -109,6 +109,15 @@
      */
     public FileSystem getFileSystem() {
         return fsc.getFileSystem();
+    }
+
+    /**
+     * Returns the file system configuration.
+     *
+     * @return file system configuration
+     */
+    public FileSystemConfig getFileSystemConfig() {
+        return fsc;
     }
 
     /**



Mime
View raw message