From jackrabbit-commits-return-1795-apmail-incubator-jackrabbit-commits-archive=www.apache.org@incubator.apache.org Thu Feb 02 15:24:28 2006 Return-Path: Delivered-To: apmail-incubator-jackrabbit-commits-archive@www.apache.org Received: (qmail 88329 invoked from network); 2 Feb 2006 15:24:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Feb 2006 15:24:27 -0000 Received: (qmail 7026 invoked by uid 500); 2 Feb 2006 15:24:27 -0000 Mailing-List: contact jackrabbit-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-commits@incubator.apache.org Received: (qmail 7015 invoked by uid 500); 2 Feb 2006 15:24:26 -0000 Delivered-To: apmail-incubator-jackrabbit-cvs@incubator.apache.org Received: (qmail 7012 invoked by uid 99); 2 Feb 2006 15:24:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2006 07:24:26 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 02 Feb 2006 07:24:25 -0800 Received: (qmail 88167 invoked by uid 65534); 2 Feb 2006 15:24:04 -0000 Message-ID: <20060202152404.88162.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: jackrabbit-cvs@incubator.apache.org From: jukka@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 must therefore be called by the + * client application once the repository instance is no longer used. + *

+ * 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 RepositoryImpl ... */ -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 WorkspaceImpl ... */ -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. *