Return-Path: Delivered-To: apmail-jackrabbit-commits-archive@www.apache.org Received: (qmail 64055 invoked from network); 29 Apr 2009 15:03:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Apr 2009 15:03:01 -0000 Received: (qmail 99521 invoked by uid 500); 29 Apr 2009 15:03:01 -0000 Delivered-To: apmail-jackrabbit-commits-archive@jackrabbit.apache.org Received: (qmail 99459 invoked by uid 500); 29 Apr 2009 15:03:01 -0000 Mailing-List: contact commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list commits@jackrabbit.apache.org Received: (qmail 99450 invoked by uid 99); 29 Apr 2009 15:03:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Apr 2009 15:03:01 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Apr 2009 15:02:59 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BEC33238896D; Wed, 29 Apr 2009 15:02:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r769795 - in /jackrabbit/trunk: jackrabbit-api/src/main/java/org/apache/jackrabbit/api/jsr283/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/ Date: Wed, 29 Apr 2009 15:02:36 -0000 To: commits@jackrabbit.apache.org From: reschke@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090429150237.BEC33238896D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: reschke Date: Wed Apr 29 15:02:35 2009 New Revision: 769795 URL: http://svn.apache.org/viewvc?rev=769795&view=rev Log: JCR-2062: add o.a.j.api.jsr283.Repository extension interface, and add method stubs in the three jackrabbit-core implementations Added: jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/jsr283/Repository.java (with props) Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/TransientRepository.java jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/BindableRepository.java Added: jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/jsr283/Repository.java URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/jsr283/Repository.java?rev=769795&view=auto ============================================================================== --- jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/jsr283/Repository.java (added) +++ jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/jsr283/Repository.java Wed Apr 29 15:02:35 2009 @@ -0,0 +1,83 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.jsr283; + +import javax.jcr.Value; + +/** + * This interface holds extensions made in JCR 2.0 while work + * is in progress implementing JCR 2.0. + * + * @since JCR 2.0 + */ +public interface Repository extends javax.jcr.Repository { + + /** + * Returns true if key is a standard descriptor + * defined by the string constants in this interface and false + * if it is either a valid implementation-specific key or not a valid key. + * + * @param key a descriptor key. + * + * @return whether key is a standard descriptor. + * + * @since JCR 2.0 + */ + public boolean isStandardDescriptor(String key); + + /** + * Returns true if key is a valid single-value + * descriptor; otherwise returns false. + * + * @param key a descriptor key. + * + * @return whether the specified desdfriptor is multi-valued. + * + * @since JCR 2.0 + */ + public boolean isSingleValueDescriptor(String key); + + /** + * The value of a single-value descriptor is found by passing the key for + * that descriptor to this method. If key is the key of a + * multi-value descriptor or not a valid key this method returns + * null. + * + * @param key a descriptor key. + * + * @return The value of the indicated descriptor + * + * @since JCR 2.0 + */ + public Value getDescriptorValue(String key); + + /** + * The value array of a multi-value descriptor is found by passing the key + * for that descriptor to this method. If key is the key of a + * single-value descriptor then this method returns that value as an array + * of size one. If key is not a valid key this method returns + * null. + * + * @param key a descriptor key. + * + * @return the value array for the indicated descriptor + * + * @since JCR 2.0 + */ + public Value[] getDescriptorValues(String key); + +} Propchange: jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/jsr283/Repository.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/jsr283/Repository.java ------------------------------------------------------------------------------ svn:keywords = author date id revision url Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java?rev=769795&r1=769794&r2=769795&view=diff ============================================================================== --- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java (original) +++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java Wed Apr 29 15:02:35 2009 @@ -84,6 +84,7 @@ import javax.jcr.RepositoryException; import javax.jcr.Session; import javax.jcr.SimpleCredentials; +import javax.jcr.Value; import javax.jcr.observation.Event; import javax.jcr.observation.EventIterator; import javax.jcr.observation.EventListener; @@ -110,7 +111,7 @@ * A RepositoryImpl ... */ public class RepositoryImpl extends AbstractRepository - implements JackrabbitRepository, SessionListener, EventListener, WorkspaceListener { + implements org.apache.jackrabbit.api.jsr283.Repository, JackrabbitRepository, SessionListener, EventListener, WorkspaceListener { private static Logger log = LoggerFactory.getLogger(RepositoryImpl.class); @@ -1418,6 +1419,23 @@ return keys; } + public Value getDescriptorValue(String key) { + throw new RuntimeException("not implemented yet - see JCR-2062"); + } + + public Value[] getDescriptorValues(String key) { + throw new RuntimeException("not implemented yet - see JCR-2062"); + } + + public boolean isSingleValueDescriptor(String key) { + throw new RuntimeException("not implemented yet - see JCR-2062"); + } + + public boolean isStandardDescriptor(String key) { + throw new RuntimeException("not implemented yet - see JCR-2062"); + } + + //------------------------------------------------------< SessionListener > /** * {@inheritDoc} Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/TransientRepository.java URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/TransientRepository.java?rev=769795&r1=769794&r2=769795&view=diff ============================================================================== --- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/TransientRepository.java (original) +++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/TransientRepository.java Wed Apr 29 15:02:35 2009 @@ -31,6 +31,7 @@ import javax.jcr.Credentials; import javax.jcr.RepositoryException; import javax.jcr.Session; +import javax.jcr.Value; import org.apache.commons.collections.map.ReferenceMap; import org.apache.commons.io.IOUtils; @@ -48,7 +49,7 @@ * shut down the repository. */ public class TransientRepository - implements JackrabbitRepository, SessionListener { + implements org.apache.jackrabbit.api.jsr283.Repository, JackrabbitRepository, SessionListener { /** * The logger instance used to log the repository and session lifecycles. @@ -378,6 +379,23 @@ return login(null, null); } + + public Value getDescriptorValue(String key) { + throw new RuntimeException("not implemented yet - see JCR-2062"); + } + + public Value[] getDescriptorValues(String key) { + throw new RuntimeException("not implemented yet - see JCR-2062"); + } + + public boolean isSingleValueDescriptor(String key) { + throw new RuntimeException("not implemented yet - see JCR-2062"); + } + + public boolean isStandardDescriptor(String key) { + throw new RuntimeException("not implemented yet - see JCR-2062"); + } + //-------------------------------------------------- /** @@ -423,5 +441,4 @@ */ public void loggingOut(SessionImpl session) { } - } Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/BindableRepository.java URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/BindableRepository.java?rev=769795&r1=769794&r2=769795&view=diff ============================================================================== --- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/BindableRepository.java (original) +++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/BindableRepository.java Wed Apr 29 15:02:35 2009 @@ -30,6 +30,7 @@ import javax.jcr.NoSuchWorkspaceException; import javax.jcr.RepositoryException; import javax.jcr.Session; +import javax.jcr.Value; import javax.naming.Reference; import javax.naming.Referenceable; @@ -58,7 +59,7 @@ * needed. */ public class BindableRepository extends AbstractRepository - implements JackrabbitRepository, Referenceable, Serializable { + implements org.apache.jackrabbit.api.jsr283.Repository, JackrabbitRepository, Referenceable, Serializable { /** * The serialization UID of this class. @@ -177,6 +178,22 @@ return repository.getDescriptorKeys(); } + public Value getDescriptorValue(String key) { + throw new RuntimeException("not implemented yet - see JCR-2062"); + } + + public Value[] getDescriptorValues(String key) { + throw new RuntimeException("not implemented yet - see JCR-2062"); + } + + public boolean isSingleValueDescriptor(String key) { + throw new RuntimeException("not implemented yet - see JCR-2062"); + } + + public boolean isStandardDescriptor(String key) { + throw new RuntimeException("not implemented yet - see JCR-2062"); + } + //--------------------------------------------------------< Referenceable > /** @@ -229,5 +246,4 @@ // ignore. exception is thrown when hook itself calls shutdown } } - }