jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r900789 - in /jackrabbit/branches/2.0: ./ jackrabbit-jca/src/main/rar/META-INF/ jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/ jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/repository/ jackrabbit-sp...
Date Tue, 19 Jan 2010 14:15:29 GMT
Author: jukka
Date: Tue Jan 19 14:15:28 2010
New Revision: 900789

URL: http://svn.apache.org/viewvc?rev=900789&view=rev
Log:
2.0: Merged revisions 900762, 900763 and 900767 (JCR-2459, JCR-2360 nad JCR-2322)

Added:
    jackrabbit/branches/2.0/jackrabbit-jca/src/main/rar/META-INF/LICENSE
      - copied unchanged from r900767, jackrabbit/trunk/jackrabbit-jca/src/main/rar/META-INF/LICENSE
    jackrabbit/branches/2.0/jackrabbit-jca/src/main/rar/META-INF/NOTICE
      - copied unchanged from r900767, jackrabbit/trunk/jackrabbit-jca/src/main/rar/META-INF/NOTICE
Removed:
    jackrabbit/branches/2.0/jackrabbit-jca/src/main/rar/META-INF/LICENSE.txt
    jackrabbit/branches/2.0/jackrabbit-jca/src/main/rar/META-INF/NOTICE.txt
Modified:
    jackrabbit/branches/2.0/   (props changed)
    jackrabbit/branches/2.0/NOTICE.txt
    jackrabbit/branches/2.0/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java
    jackrabbit/branches/2.0/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/repository/ProxyRepository.java
    jackrabbit/branches/2.0/jackrabbit-spi-commons/src/main/appended-resources/META-INF/NOTICE
    jackrabbit/branches/2.0/jackrabbit-standalone/src/main/appended-resources/META-INF/NOTICE
    jackrabbit/branches/2.0/jackrabbit-webapp/src/main/webapp/META-INF/NOTICE

Propchange: jackrabbit/branches/2.0/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 19 14:15:28 2010
@@ -2,4 +2,4 @@
 /jackrabbit/sandbox/JCR-1456:774917-886178
 /jackrabbit/sandbox/JCR-2170:812417-816332
 /jackrabbit/sandbox/tripod-JCR-2209:795441-795863
-/jackrabbit/trunk:891595,891629,892253,892263,894150-894151,896408,896513,896532,896857,896870,896876,896908,896940,896942-896943,896969,896977,897071,897836,897842,897858,897935,897983,897992-897993,897996,898002,898042,898267,898325,898540,898677,898699,898701,898715,898872,899102,899181,899391,899393-899394,899583,899594,900305,900310,900314,900453,900702,900736
+/jackrabbit/trunk:891595,891629,892253,892263,894150-894151,896408,896513,896532,896857,896870,896876,896908,896940,896942-896943,896969,896977,897071,897836,897842,897858,897935,897983,897992-897993,897996,898002,898042,898267,898325,898540,898677,898699,898701,898715,898872,899102,899181,899391,899393-899394,899583,899594,900305,900310,900314,900453,900702,900736,900762-900763,900767

Modified: jackrabbit/branches/2.0/NOTICE.txt
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.0/NOTICE.txt?rev=900789&r1=900788&r2=900789&view=diff
==============================================================================
--- jackrabbit/branches/2.0/NOTICE.txt (original)
+++ jackrabbit/branches/2.0/NOTICE.txt Tue Jan 19 14:15:28 2010
@@ -6,8 +6,3 @@
 
 Based on source code originally developed by
 Day Software (http://www.day.com/).
-
-This product contains an XPath parser from the World Wide Web Consortium.
-Copyright (c) 2002 World Wide Web Consortium, (Massachusetts Institute of
-Technology, European Research Consortium for Informatics and Mathematics,
-Keio University).

Modified: jackrabbit/branches/2.0/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.0/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java?rev=900789&r1=900788&r2=900789&view=diff
==============================================================================
--- jackrabbit/branches/2.0/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java
(original)
+++ jackrabbit/branches/2.0/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java
Tue Jan 19 14:15:28 2010
@@ -143,6 +143,10 @@
                 log.append(e.getMessage());
             }
         }
+        log.append(newline);
+        log.append(
+                "Perhaps the repository you are trying"
+                + " to access is not available at the moment.");
 
         // No matching repository found. Throw an exception with the
         // detailed information we gathered during the above process.

Modified: jackrabbit/branches/2.0/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/repository/ProxyRepository.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.0/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/repository/ProxyRepository.java?rev=900789&r1=900788&r2=900789&view=diff
==============================================================================
--- jackrabbit/branches/2.0/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/repository/ProxyRepository.java
(original)
+++ jackrabbit/branches/2.0/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/repository/ProxyRepository.java
Tue Jan 19 14:15:28 2010
@@ -16,12 +16,17 @@
  */
 package org.apache.jackrabbit.commons.repository;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import javax.jcr.Credentials;
+import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.jcr.Value;
 
 import org.apache.jackrabbit.commons.AbstractRepository;
+import org.apache.jackrabbit.commons.JcrUtils;
 
 /**
  * Repository that proxies all method calls to another repository.
@@ -38,6 +43,13 @@
     private final RepositoryFactory factory;
 
     /**
+     * Repository access parameters. Used if an explicit repository
+     * factory has not been configured.
+     */
+    private final Map<String, String> parameters =
+        new HashMap<String, String>();
+
+    /**
      * Creates a proxy for the repository (or repositories) accessible
      * through the given factory.
      *
@@ -48,6 +60,43 @@
     }
 
     /**
+     * Creates a proxy for the repository (or repositories) accessible
+     * using the given repository parameters.
+     *
+     * @param parameters repository parameters
+     */
+    public ProxyRepository(Map<String, String> parameters) {
+        this.factory = null;
+        this.parameters.putAll(parameters);
+    }
+
+    /**
+     * Creates a proxy for the repository accessible using the given
+     * repository URI.
+     *
+     * @param uri repository URI
+     */
+    public ProxyRepository(String uri) {
+        this.factory = null;
+        this.parameters.put(JcrUtils.REPOSITORY_URI, uri);
+    }
+
+    /**
+     * Returns the proxied repository. Subclasses can override this
+     * method to implement custom repository access mechanisms.
+     *
+     * @return repository
+     * @throws RepositoryException if the repository can not be accessed
+     */
+    protected Repository getRepository() throws RepositoryException {
+        if (factory != null) {
+            return factory.getRepository();
+        } else {
+            return JcrUtils.getRepository(parameters);
+        }
+    }
+
+    /**
      * Returns the descriptor keys of the proxied repository, or an empty
      * array if the proxied repository can not be accessed.
      *
@@ -55,7 +104,7 @@
      */
     public String[] getDescriptorKeys() {
         try {
-            return factory.getRepository().getDescriptorKeys();
+            return getRepository().getDescriptorKeys();
         } catch (RepositoryException e) {
             return new String[0];
         }
@@ -72,7 +121,7 @@
      */
     public boolean isSingleValueDescriptor(String key) {
         try {
-            return factory.getRepository().isSingleValueDescriptor(key);
+            return getRepository().isSingleValueDescriptor(key);
         } catch (RepositoryException e) {
             return false;
         }
@@ -88,7 +137,7 @@
      */
     public String getDescriptor(String key) {
         try {
-            return factory.getRepository().getDescriptor(key);
+            return getRepository().getDescriptor(key);
         } catch (RepositoryException e) {
             return null;
         }
@@ -104,7 +153,7 @@
      */
     public Value getDescriptorValue(String key) {
         try {
-            return factory.getRepository().getDescriptorValue(key);
+            return getRepository().getDescriptorValue(key);
         } catch (RepositoryException e) {
             return null;
         }
@@ -120,7 +169,7 @@
      */
     public Value[] getDescriptorValues(String key) {
         try {
-            return factory.getRepository().getDescriptorValues(key);
+            return getRepository().getDescriptorValues(key);
         } catch (RepositoryException e) {
             return null;
         }
@@ -138,7 +187,7 @@
      */
     public Session login(Credentials credentials, String workspace)
             throws RepositoryException {
-        return factory.getRepository().login(credentials, workspace);
+        return getRepository().login(credentials, workspace);
     }
 
 }

Modified: jackrabbit/branches/2.0/jackrabbit-spi-commons/src/main/appended-resources/META-INF/NOTICE
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.0/jackrabbit-spi-commons/src/main/appended-resources/META-INF/NOTICE?rev=900789&r1=900788&r2=900789&view=diff
==============================================================================
--- jackrabbit/branches/2.0/jackrabbit-spi-commons/src/main/appended-resources/META-INF/NOTICE
(original)
+++ jackrabbit/branches/2.0/jackrabbit-spi-commons/src/main/appended-resources/META-INF/NOTICE
Tue Jan 19 14:15:28 2010
@@ -1,7 +1,2 @@
 Based on source code originally developed by
 Day Software (http://www.day.com/).
-
-This product contains an XPath parser from the World Wide Web Consortium.
-Copyright (c) 2002 World Wide Web Consortium, (Massachusetts Institute of
-Technology, European Research Consortium for Informatics and Mathematics,
-Keio University).

Modified: jackrabbit/branches/2.0/jackrabbit-standalone/src/main/appended-resources/META-INF/NOTICE
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.0/jackrabbit-standalone/src/main/appended-resources/META-INF/NOTICE?rev=900789&r1=900788&r2=900789&view=diff
==============================================================================
--- jackrabbit/branches/2.0/jackrabbit-standalone/src/main/appended-resources/META-INF/NOTICE
(original)
+++ jackrabbit/branches/2.0/jackrabbit-standalone/src/main/appended-resources/META-INF/NOTICE
Tue Jan 19 14:15:28 2010
@@ -1,57 +1,2 @@
 Based on source code originally developed by
 Day Software (http://www.day.com/).
-
-This product contains an XPath parser from the World Wide Web Consortium.
-Copyright (c) 2002 World Wide Web Consortium, (Massachusetts Institute of
-Technology, European Research Consortium for Informatics and Mathematics,
-Keio University).
-
-This product includes Apache Derby, which is based on source code originally
-developed at the International Business Machines Corporation.
-(C) Copyright 1997,2004 International Business Machines Corporation.
-All rights reserved.
-(C) Copyright IBM Corp. 2003.
-
-This software contains PDF reader functionality from the PDFBox, FontBox, and
-JempBox projects. Copyright (c) 2003-2005, www.pdfbox.org and www.fontbox.org.
-
-This software contains SLF4J libraries. Copyright (c) 2004-2008 QOS.ch
-
-This product includes Apache Xerces, portions of which were
-originally based on the following:
-- software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-- software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-- voluntary contributions made by Paul Eng on behalf of the
-  Apache Software Foundation that were originally developed at iClick, Inc.,
-  software copyright (c) 1999.
-
-This product includes the DOM Java Language Binding from the World Wide
-Web Consortium.
-Copyright (C) 2000 World Wide Web Consortium, (Massachusetts Institute of
-Technology, Institut National de Recherche en Informatique et en
-Automatique, Keio University). All Rights Reserved.
-
-This product includes the Concurrent library, portions of which are
-based on code from Sun Microsystems.
-Copyright (c) 1994-2000 Sun Microsystems, Inc. All rights reserved.
-
-This product includes the Jetty Web Container that is Copyright Mort Bay
-Consulting Pty Ltd unless otherwise noted.
-
-The javax.servlet package used by Jetty is copyright  Sun Microsystems, Inc
-and Apache Software Foundation.
-
-The UnixCrypt.java code in Jetty is Copyright 1996 Aki Yoshida, modified
-April 2001  by Iris Van den Broeke, Daniel Deville. Permission to use, copy,
-modify and distribute UnixCrypt  for non-commercial or commercial purposes
-and without fee is granted provided that the copyright notice appears in
-all copies.
-
-The JSP implementation in Jetty is provided by the Glassfish JSP engine from
-project Glassfish http://glassfish.dev.java.net.
-Copyright 2005 Sun Microsystems, Inc. and portions Copyright Apache Software
-Foundation.
-
-Some portions of Jetty are Copyright:
-  2006 Tim Vernum 
-  1999 Jason Gilbert.

Modified: jackrabbit/branches/2.0/jackrabbit-webapp/src/main/webapp/META-INF/NOTICE
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.0/jackrabbit-webapp/src/main/webapp/META-INF/NOTICE?rev=900789&r1=900788&r2=900789&view=diff
==============================================================================
--- jackrabbit/branches/2.0/jackrabbit-webapp/src/main/webapp/META-INF/NOTICE (original)
+++ jackrabbit/branches/2.0/jackrabbit-webapp/src/main/webapp/META-INF/NOTICE Tue Jan 19 14:15:28
2010
@@ -6,37 +6,3 @@
 
 Based on source code originally developed by
 Day Software (http://www.day.com/).
-
-This product contains an XPath parser from the World Wide Web Consortium.
-Copyright (c) 2002 World Wide Web Consortium, (Massachusetts Institute of
-Technology, European Research Consortium for Informatics and Mathematics,
-Keio University).
-
-This product includes Apache Derby, which is based on source code originally
-developed at the International Business Machines Corporation.
-(C) Copyright 1997,2004 International Business Machines Corporation.
-All rights reserved.
-(C) Copyright IBM Corp. 2003.
-
-This software contains PDF reader functionality from the PDFBox, FontBox, and
-JempBox projects. Copyright (c) 2003-2005, www.pdfbox.org and www.fontbox.org.
-
-This software contains SLF4J libraries. Copyright (c) 2004-2008 QOS.ch
-
-This product includes Apache Xerces, portions of which were
-originally based on the following:
-- software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-- software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-- voluntary contributions made by Paul Eng on behalf of the
-  Apache Software Foundation that were originally developed at iClick, Inc.,
-  software copyright (c) 1999.
-
-This product includes the DOM Java Language Binding from the World Wide
-Web Consortium.
-Copyright (C) 2000 World Wide Web Consortium, (Massachusetts Institute of
-Technology, Institut National de Recherche en Informatique et en
-Automatique, Keio University). All Rights Reserved.
-
-This product includes the Concurrent library, portions of which are
-based on code from Sun Microsystems.
-Copyright (c) 1994-2000 Sun Microsystems, Inc. All rights reserved.



Mime
View raw message