jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r374406 - in /incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit: api/ api/JackrabbitRepository.java api/JackrabbitWorkspace.java core/RepositoryImpl.java core/WorkspaceImpl.java
Date Thu, 02 Feb 2006 15:24:02 GMT
Author: jukka
Date: Thu Feb  2 07:23:56 2006
New Revision: 374406

URL: http://svn.apache.org/viewcvs?rev=374406&view=rev
Log:
JCR-309: Added Jackrabbit-specific public extensions to the JCR Repository and Workspace interfaces.

Added:
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/api/
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/api/JackrabbitRepository.java
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/api/JackrabbitWorkspace.java
Modified:
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/WorkspaceImpl.java

Added: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/api/JackrabbitRepository.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/api/JackrabbitRepository.java?rev=374406&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/api/JackrabbitRepository.java
(added)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/api/JackrabbitRepository.java
Thu Feb  2 07:23:56 2006
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.api;
+
+import javax.jcr.Repository;
+
+/**
+ * The Jackrabbit repository interface. This interface contains the
+ * Jackrabbit-specific extensions to the JCR {@link Repository} interface.
+ */
+public interface JackrabbitRepository extends Repository {
+
+	/**
+	 * Shuts down the repository. A Jackrabbit repository instance contains
+	 * a acquired resources and cached data that needs to be released and
+	 * persisted when the repository is no longer used. This method handles
+	 * all these shutdown tasks and <em>must</em> therefore be called by the
+	 * client application once the repository instance is no longer used.
+	 * <p>
+	 * Possible errors are logged rather than thrown as exceptions as there
+	 * is little that a client application could do in such a case. 
+	 */
+	void shutdown();
+
+}

Added: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/api/JackrabbitWorkspace.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/api/JackrabbitWorkspace.java?rev=374406&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/api/JackrabbitWorkspace.java
(added)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/api/JackrabbitWorkspace.java
Thu Feb  2 07:23:56 2006
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.api;
+
+import javax.jcr.AccessDeniedException;
+import javax.jcr.RepositoryException;
+import javax.jcr.Workspace;
+
+/**
+ * The Jackrabbit workspace interface. This interface contains the
+ * Jackrabbit-specific extensions to the JCR {@link Workspace} interface.
+ */
+public interface JackrabbitWorkspace extends Workspace {
+
+    /**
+     * Creates a workspace with the given name.
+     *
+     * @param workspaceName name of the new workspace
+     * @throws AccessDeniedException if the current session is not allowed to
+     *                               create the workspace
+     * @throws RepositoryException   if a workspace with the given name
+     *                               already exists or if another error occurs
+     * @see #getAccessibleWorkspaceNames()
+     */
+	void createWorkspace(String workspaceName)
+		throws AccessDeniedException, RepositoryException;
+
+}

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java?rev=374406&r1=374405&r2=374406&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Thu Feb  2 07:23:56 2006
@@ -17,6 +17,7 @@
 package org.apache.jackrabbit.core;
 
 import org.apache.commons.collections.map.ReferenceMap;
+import org.apache.jackrabbit.api.JackrabbitRepository;
 import org.apache.jackrabbit.core.config.LoginModuleConfig;
 import org.apache.jackrabbit.core.config.PersistenceManagerConfig;
 import org.apache.jackrabbit.core.config.RepositoryConfig;
@@ -51,7 +52,6 @@
 import javax.jcr.LoginException;
 import javax.jcr.NamespaceRegistry;
 import javax.jcr.NoSuchWorkspaceException;
-import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.jcr.observation.Event;
@@ -80,7 +80,7 @@
 /**
  * A <code>RepositoryImpl</code> ...
  */
-public class RepositoryImpl implements Repository, SessionListener,
+public class RepositoryImpl implements JackrabbitRepository, SessionListener,
         EventListener {
 
     private static Logger log = Logger.getLogger(RepositoryImpl.class);
@@ -786,6 +786,7 @@
         return ses;
     }
 
+    //-------------------------------------------------< JackrabbitRepository >
     /**
      * Shuts down this repository.
      */

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/WorkspaceImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/WorkspaceImpl.java?rev=374406&r1=374405&r2=374406&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/WorkspaceImpl.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/WorkspaceImpl.java
Thu Feb  2 07:23:56 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.jackrabbit.core;
 
+import org.apache.jackrabbit.api.JackrabbitWorkspace;
 import org.apache.jackrabbit.core.config.WorkspaceConfig;
 import org.apache.jackrabbit.core.lock.LockManager;
 import org.apache.jackrabbit.core.observation.ObservationManagerFactory;
@@ -51,7 +52,6 @@
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.Workspace;
 import javax.jcr.lock.LockException;
 import javax.jcr.nodetype.ConstraintViolationException;
 import javax.jcr.nodetype.NodeTypeManager;
@@ -68,7 +68,7 @@
 /**
  * A <code>WorkspaceImpl</code> ...
  */
-public class WorkspaceImpl implements Workspace, EventStateCollectionFactory {
+public class WorkspaceImpl implements JackrabbitWorkspace, EventStateCollectionFactory {
 
     private static Logger log = Logger.getLogger(WorkspaceImpl.class);
 
@@ -176,6 +176,7 @@
         session.sanityCheck();
     }
 
+    //--------------------------------------------------< JackrabbitWorkspace >
     /**
      * Creates a workspace with the given name.
      *



Mime
View raw message