jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r180346 [1/9] - in /incubator/jackrabbit/trunk/contrib/jcr-server: ./ client/ client/src/java/org/apache/jackrabbit/client/ client/src/java/org/apache/jackrabbit/webdav/client/methods/ commons/ commons/src/ commons/src/java/ commons/src/java/org/ commons/src/java/org/apache/ commons/src/java/org/apache/jackrabbit/ commons/src/java/org/apache/jackrabbit/nodetype/ commons/src/java/org/apache/jackrabbit/nodetype/xml/ commons/src/java/org/apache/jackrabbit/util/ commons/src/java/org/apache/jackrabbit/util/uuid/ commons/src/java/org/apache/jackrabbit/value/ server/ server/src/java/org/apache/jackrabbit/server/ server/src/java/org/apache/jackrabbit/server/io/ server/src/java/org/apache/jackrabbit/server/jcr/ server/src/java/org/apache/jackrabbit/server/simple/ server/src/java/org/apache/jackrabbit/webdav/jcr/ server/src/java/org/apache/jackrabbit/webdav/jcr/lock/ server/src/java/org/apache/jackrabbit/webdav/jcr/nodetype/ server/src/java/org/apache/jackrabbit/webdav/jcr/observation/ server/src/java/org/apache/jackrabbit/webdav/jcr/property/ server/src/java/org/apache/jackrabbit/webdav/jcr/search/ server/src/java/org/apache/jackrabbit/webdav/jcr/transaction/ server/src/java/org/apache/jackrabbit/webdav/jcr/version/ server/src/java/org/apache/jackrabbit/webdav/jcr/version/report/ server/src/java/org/apache/jackrabbit/webdav/simple/ webapp/ webapp/src/java/ webapp/src/java/org/ webapp/src/java/org/apache/ webapp/src/java/org/apache/jackrabbit/ webapp/src/java/org/apache/jackrabbit/j2ee/ webapp/src/webapp/ webapp/src/webapp/WEB-INF/ webdav/ webdav/src/java/org/apache/jackrabbit/webdav/ webdav/src/java/org/apache/jackrabbit/webdav/jcr/ webdav/src/java/org/apache/jackrabbit/webdav/lock/ webdav/src/java/org/apache/jackrabbit/webdav/property/ webdav/src/java/org/apache/jackrabbit/webdav/util/ webdav/src/java/org/apache/jackrabbit/webdav/version/report/
Date Mon, 06 Jun 2005 17:36:13 GMT
Author: tripod
Date: Mon Jun  6 10:36:09 2005
New Revision: 180346

URL: http://svn.apache.org/viewcvs?rev=180346&view=rev
Log:
applying patch from angela, fixing:

[JCR-122] cannot PUT changes to a resource in the simple webdav server
[JCR-123] Webdav: Error when accessing Simple-Server
[JCR-126] Jcr-Server Module: Remove Dependency from Jackrabbit-Core

Added:
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/maven.xml   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/project.properties   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/project.xml   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/nodetype/
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/nodetype/xml/
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/nodetype/xml/Constants.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/Base64.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/IteratorHelper.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/Text.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/uuid/
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/uuid/Bytes.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/uuid/Constants.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/uuid/UUID.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/uuid/VersionFourGenerator.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/uuid/package.html   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/value/
    incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/value/ValueHelper.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/CredentialsProvider.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/SessionProvider.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/SessionProviderImpl.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/AbstractCommand.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/AbstractContext.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/CheckinCommand.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/MimeResolver.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/SaveCommand.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/mimetypes.properties   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/AbstractItemResource.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/AbstractResource.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DavLocatorFactoryImpl.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DavResourceFactoryImpl.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DefaultItemCollection.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DefaultItemResource.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/ItemResourceConstants.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/JcrDavException.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/RootCollection.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/RootItemCollection.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/VersionControlledItemCollection.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/lock/
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/lock/JcrActiveLock.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/lock/SessionScopedLockEntry.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/nodetype/
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/nodetype/ItemDefinitionImpl.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/nodetype/NodeDefinitionImpl.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/nodetype/NodeTypeConstants.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/nodetype/NodeTypeElement.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/nodetype/NodeTypeProperty.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/nodetype/PropertyDefinitionImpl.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/observation/
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/observation/SubscriptionImpl.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/observation/SubscriptionManagerImpl.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/package.html   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/LengthsProperty.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/ValuesProperty.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/search/
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/search/SearchResourceImpl.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/search/SearchResultProperty.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/transaction/
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/transaction/TxLockManagerImpl.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/VersionHistoryItemCollection.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/VersionItemCollection.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/package.html   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/report/
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/report/ExportViewReport.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/report/LocateByUuidReport.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/report/NodeTypesReport.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/report/RegisteredNamespacesReport.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/report/RepositoryDescriptorsReport.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/report/package.html   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/
    incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/
    incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/
    incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/
    incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/
    incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/JCRWebdavServerServlet.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/SimpleWebdavServlet.java   (with props)
Removed:
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/client/RepositoryAccessServlet.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/RepositoryStartupServlet.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/jcr/JCRWebdavServerServlet.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/simple/
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/jcr/
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/util/Text.java
Modified:
    incubator/jackrabbit/trunk/contrib/jcr-server/client/   (props changed)
    incubator/jackrabbit/trunk/contrib/jcr-server/client/project.xml
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PropFindMethod.java
    incubator/jackrabbit/trunk/contrib/jcr-server/project.properties
    incubator/jackrabbit/trunk/contrib/jcr-server/server/   (props changed)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/project.xml
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/AbstractWebdavServlet.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/AbstractExportCommand.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/AbstractImportCommand.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/AddMixinCommand.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/AddNodeCommand.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/DirListingExportCommand.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/ExportCollectionChain.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/ExportContext.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/FileExportCommand.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/ImportContext.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/ImportResourceChain.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/PrimaryItemExportCommand.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/SetContentTypeCommand.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/XMLExportCommand.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/XMLImportCommand.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/ZIPImportCommand.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/jcr/JCRWebdavServer.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/simple/DavResourceImpl.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/simple/DavSessionProviderImpl.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webapp/project.xml
    incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/webapp/WEB-INF/catalog.xml
    incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/webapp/WEB-INF/web.xml
    incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/webapp/index.jsp
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/project.xml
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/DavSessionProvider.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/WebdavResponseImpl.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/lock/DefaultActiveLock.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/lock/SimpleLockManager.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/property/DavPropertyNameSet.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/report/ReportType.java

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Jun  6 10:36:09 2005
@@ -1 +1,2 @@
 target
+*.iml

Modified: incubator/jackrabbit/trunk/contrib/jcr-server/client/project.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/project.xml?rev=180346&r1=180345&r2=180346&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/project.xml (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/project.xml Mon Jun  6 10:36:09 2005
@@ -23,36 +23,41 @@
     <id>jcr-client</id>
     <groupId>jcr-server</groupId>
     <type>jar</type>
-    <name>Client Library</name>
+    <name>JCRWebdavServer Client Library</name>
 
     <!-- ====================================================================== -->
     <!-- D E P E N D E N C I E S                                                -->
     <!-- ====================================================================== -->
     <dependencies>
+        <!-- internal dependencies -->
         <dependency>
             <artifactId>jcr-webdav</artifactId>
             <groupId>jcr-server</groupId>
             <version>${pom.currentVersion}</version>
         </dependency>
+        
+        <!-- external dependencies -->
         <dependency>
             <groupId>jsr170</groupId>
             <artifactId>jcr</artifactId>
-            <version>0.16.4.1</version>
-            <url>http://www.day.com/maven/jsr170/jars/jcr-0.16.4.1.jar</url>
+            <version>${jackrabbit.build.version.jcr}</version>
         </dependency>
         <dependency>
             <id>jackrabbit</id>
-            <version>0.16.4.1-dev</version>
-        </dependency>
-        <dependency>
-            <id>jcr-rmi</id>
-            <version>0.16.4.1</version>
+            <version>${jackrabbit.build.version.jackrabbit}</version>
         </dependency>
+        
+        <!-- non-jackrabbit dependencies -->
         <dependency>
             <id>jdom</id>
             <version>1.0</version>
         </dependency>
         <dependency>
+            <groupId>xerces</groupId>
+            <artifactId>xercesImpl</artifactId>
+            <version>2.6.2</version>
+        </dependency>
+        <dependency>
             <id>log4j</id>
             <version>1.2.8</version>
         </dependency>
@@ -67,6 +72,15 @@
         <dependency>
           <id>commons-collections</id>
           <version>3.1</version>
+        </dependency>
+        <dependency>
+          <id>commons-logging</id>
+          <version>1.0</version>
+        </dependency>
+        <dependency>
+          <groupId>xml-apis</groupId>
+          <artifactId>xmlParserAPIs</artifactId>
+          <version>2.0.2</version>
         </dependency>
     </dependencies>
 

Modified: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PropFindMethod.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PropFindMethod.java?rev=180346&r1=180345&r2=180346&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PropFindMethod.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PropFindMethod.java Mon Jun  6 10:36:09 2005
@@ -17,19 +17,10 @@
 
 import org.apache.log4j.Logger;
 import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
-import org.apache.jackrabbit.webdav.property.DavPropertyName;
 import org.apache.jackrabbit.webdav.DavMethods;
-import org.apache.jackrabbit.webdav.DavException;
-import org.apache.jackrabbit.webdav.DavServletResponse;
-import org.apache.jackrabbit.webdav.MultiStatus;
 import org.apache.jackrabbit.webdav.header.DepthHeader;
 import org.jdom.Element;
 import org.jdom.Document;
-import org.jdom.JDOMException;
-import org.xml.sax.ContentHandler;
-
-import java.io.IOException;
-import java.util.Iterator;
 
 /**
  * <code>PropFindMethod</code>...
@@ -39,47 +30,46 @@
     private static Logger log = Logger.getLogger(PropFindMethod.class);
 
     public PropFindMethod(String uri) {
-	this(uri, PROPFIND_ALL_PROP, new DavPropertyNameSet(), DEPTH_INFINITY);
+        this(uri, PROPFIND_ALL_PROP, new DavPropertyNameSet(), DEPTH_INFINITY);
     }
 
     public PropFindMethod(String uri, DavPropertyNameSet propNameSet, int depth) {
-	this(uri, PROPFIND_BY_PROPERTY, propNameSet, depth);
+        this(uri, PROPFIND_BY_PROPERTY, propNameSet, depth);
     }
 
     public PropFindMethod(String uri, int propfindType, int depth) {
-	this(uri, propfindType, new DavPropertyNameSet(), depth);
+        this(uri, propfindType, new DavPropertyNameSet(), depth);
     }
 
     private PropFindMethod(String uri, int propfindType, DavPropertyNameSet propNameSet, int depth) {
         super(uri);
 
-	DepthHeader dh = new DepthHeader(depth);
-	setRequestHeader(dh.getHeaderName(), dh.getHeaderValue());
-	setRequestHeader("Content-Type","text/xml; charset=UTF-8");
-
-	// build the request body
-	Element propfind = new Element(XML_PROPFIND, NAMESPACE);
-	switch (propfindType) {
-	    case PROPFIND_ALL_PROP:
-		propfind.addContent(new Element(XML_ALLPROP, NAMESPACE));
-		break;
-	    case PROPFIND_PROPERTY_NAMES:
-		propfind.addContent(new Element(XML_PROPNAME, NAMESPACE));
-		break;
-	    default:
-		Element prop = new Element(XML_PROP, NAMESPACE);
-		propfind.addContent(prop);
-		Iterator it = propNameSet.iterator();
-		while (it.hasNext()) {
-		    prop.addContent(((DavPropertyName)it.next()).toXml());
-		}
-		break;
-	}
-	Document propfindBody = new Document(propfind);
-	setRequestBody(propfindBody);
+        DepthHeader dh = new DepthHeader(depth);
+        setRequestHeader(dh.getHeaderName(), dh.getHeaderValue());
+        setRequestHeader("Content-Type","text/xml; charset=UTF-8");
+
+        // build the request body
+        Element propfind = new Element(XML_PROPFIND, NAMESPACE);
+        switch (propfindType) {
+            case PROPFIND_ALL_PROP:
+                propfind.addContent(new Element(XML_ALLPROP, NAMESPACE));
+                break;
+            case PROPFIND_PROPERTY_NAMES:
+                propfind.addContent(new Element(XML_PROPNAME, NAMESPACE));
+                break;
+            default:
+                if (propNameSet == null) {
+                    propfind.addContent(new Element(XML_PROP, NAMESPACE));
+                } else {
+                    propfind.addContent(propNameSet.toXml());
+                }
+                break;
+        }
+        Document propfindBody = new Document(propfind);
+        setRequestBody(propfindBody);
     }
 
     public String getName() {
-	return DavMethods.METHOD_PROPFIND;
+        return DavMethods.METHOD_PROPFIND;
     }
 }

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/commons/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Jun  6 10:36:09 2005
@@ -0,0 +1,2 @@
+target
+commons-jcr.iml

Added: incubator/jackrabbit/trunk/contrib/jcr-server/commons/maven.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/commons/maven.xml?rev=180346&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/commons/maven.xml (added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/commons/maven.xml Mon Jun  6 10:36:09 2005
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!--
+   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.
+-->
+<project default="jar">
+
+    <goal name="server-dist">
+        <attainGoal name="jar:install" />
+    </goal>
+</project>

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/commons/maven.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/jcr-server/commons/project.properties
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/commons/project.properties?rev=180346&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/commons/project.properties (added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/commons/project.properties Mon Jun  6 10:36:09 2005
@@ -0,0 +1,2 @@
+maven.javadoc.links=http://java.sun.com/j2se/1.4.2/docs/api/,http://www.day.com/maven/jsr170/javadocs/jcr-0.16.1-pfd/
+maven.repo.remote = http://www.ibiblio.org/maven/,http://www.day.com/maven/

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/commons/project.properties
------------------------------------------------------------------------------
    svn = 

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/commons/project.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/jcr-server/commons/project.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/commons/project.xml?rev=180346&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/commons/project.xml (added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/commons/project.xml Mon Jun  6 10:36:09 2005
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<!--
+   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.
+  -->
+<project>
+    <!-- ====================================================================== -->
+    <!-- P R O J E C T  D E S C R I P T I O N                                   -->
+    <!-- ====================================================================== -->
+    <extend>${basedir}/../project.xml</extend>
+    <id>commons-jcr</id>
+    <groupId>jcr-server</groupId>
+    <type>jar</type>
+    <name>JCR Commons Library</name>
+
+    <!-- ====================================================================== -->
+    <!-- D E P E N D E N C I E S                                                -->
+    <!-- ====================================================================== -->
+    <dependencies>
+        <!-- external dependencies -->
+        <dependency>
+            <groupId>jsr170</groupId>
+            <artifactId>jcr</artifactId>
+            <version>${jackrabbit.build.version.jcr}</version>
+        </dependency>
+        
+        <!-- non-jackrabbit dependencies -->
+        <dependency>
+            <id>log4j</id>
+            <version>1.2.8</version>
+        </dependency>
+    </dependencies>
+
+    <!-- ====================================================================== -->
+    <!-- B U I L D  D E S C R I P T I O N                                       -->
+    <!-- ====================================================================== -->
+    <build>
+        <sourceDirectory>${basedir}/src/java</sourceDirectory>
+        <resources>
+            <resource>
+                <directory>src/java</directory>
+                <includes>
+                    <include>**/*.xml</include>
+                    <include>**/*.xsd</include>
+                    <include>**/*.properties</include>
+                    <include>**/*.dtd</include>
+                </includes>
+            </resource>
+        </resources>
+    </build>
+
+</project>

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/commons/project.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/nodetype/xml/Constants.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/nodetype/xml/Constants.java?rev=180346&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/nodetype/xml/Constants.java (added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/nodetype/xml/Constants.java Mon Jun  6 10:36:09 2005
@@ -0,0 +1,97 @@
+/*
+ * 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.nodetype.xml;
+
+/**
+ * Name constants for the node type XML elements and attributes as used for
+ * serialization and deserialization of {@link javax.jcr.nodetype.NodeType}s.
+ */
+public interface Constants {
+
+    /** Name of the node type definition root element. */
+    String NODETYPES_ELEMENT = "nodeTypes";
+
+    /** Name of the node type definition element. */
+    String NODETYPE_ELEMENT = "nodeType";
+
+    /** Name of the child node definition element. */
+    String CHILDNODEDEFINITION_ELEMENT = "childNodeDefinition";
+
+    /** Name of the property definition element. */
+    String PROPERTYDEFINITION_ELEMENT = "propertyDefinition";
+
+    /** Name of the <code>isMixin</code> attribute. */
+    String ISMIXIN_ATTRIBUTE = "isMixin";
+
+    /** Name of the <code>hasOrderableChildNodes</code> attribute. */
+    String HASORDERABLECHILDNODES_ATTRIBUTE = "hasOrderableChildNodes";
+
+    /** Name of the primary item name attribute. */
+    String PRIMARYITEMNAME_ATTRIBUTE = "primaryItemName";
+
+    /** Name of the supertypes element. */
+    String SUPERTYPES_ELEMENT = "supertypes";
+
+    /** Name of the supertype element. */
+    String SUPERTYPE_ELEMENT = "supertype";
+
+    /** Name of the <code>name</code> attribute. */
+    String NAME_ATTRIBUTE = "name";
+
+    /** Name of the <code>autoCreated</code> attribute. */
+    String AUTOCREATED_ATTRIBUTE = "autoCreated";
+
+    /** Name of the <code>mandatory</code> attribute. */
+    String MANDATORY_ATTRIBUTE = "mandatory";
+
+    /** Name of the <code>onParentVersion</code> attribute. */
+    String ONPARENTVERSION_ATTRIBUTE = "onParentVersion";
+
+    /** Name of the <code>protected</code> attribute. */
+    String PROTECTED_ATTRIBUTE = "protected";
+
+    /** Name of the required type attribute. */
+    String REQUIREDTYPE_ATTRIBUTE = "requiredType";
+
+    /** Name of the value constraints element. */
+    String VALUECONSTRAINTS_ELEMENT = "valueConstraints";
+
+    /** Name of the value constraint element. */
+    String VALUECONSTRAINT_ELEMENT = "valueConstraint";
+
+    /** Name of the default values element. */
+    String DEFAULTVALUES_ELEMENT = "defaultValues";
+
+    /** Name of the default value element. */
+    String DEFAULTVALUE_ELEMENT = "defaultValue";
+
+    /** Name of the <code>multiple</code> attribute. */
+    String MULTIPLE_ATTRIBUTE = "multiple";
+
+    /** Name of the required primary types element. */
+    String REQUIREDPRIMARYTYPES_ELEMENT = "requiredPrimaryTypes";
+
+    /** Name of the required primary type element. */
+    String REQUIREDPRIMARYTYPE_ELEMENT = "requiredPrimaryType";
+
+    /** Name of the default primary type attribute. */
+    String DEFAULTPRIMARYTYPE_ATTRIBUTE = "defaultPrimaryType";
+
+    /** Name of the <code>sameNameSiblings</code> attribute. */
+    String SAMENAMESIBLINGS_ATTRIBUTE = "sameNameSiblings";
+
+}

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/nodetype/xml/Constants.java
------------------------------------------------------------------------------
    svn = 

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/nodetype/xml/Constants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/Base64.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/Base64.java?rev=180346&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/Base64.java (added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/Base64.java Mon Jun  6 10:36:09 2005
@@ -0,0 +1,278 @@
+/*
+ * 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.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Reader;
+import java.io.Writer;
+
+/**
+ * <code>Base64</code> provides Base64 encoding/decoding of strings and streams.
+ */
+public class Base64 {
+    // charset used for base64 encoded data (7-bit ASCII)
+    private static final String CHARSET = "US-ASCII";
+
+    // encoding table (the 64 valid base64 characters)
+    private static final char[] BASE64CHARS =
+            "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".toCharArray();
+
+    // decoding table (used to lookup original 6-bit with base64 character
+    // as table index)
+    private static final byte[] DECODETABLE = new byte[128];
+
+    static {
+        // initialize decoding table
+        for (int i = 0; i < DECODETABLE.length; i++) {
+            DECODETABLE[i] = 0x7f;
+        }
+        // build decoding table
+        for (int i = 0; i < BASE64CHARS.length; i++) {
+            DECODETABLE[BASE64CHARS[i]] = (byte) i;
+        }
+    }
+
+    // pad character
+    private static final char BASE64PAD = '=';
+
+    /**
+     * empty private constructor
+     */
+    private Base64() {
+    }
+
+    /**
+     * Calculates the size (i.e. number of bytes) of the base64 encoded output
+     * given the length (i.e. number of bytes) of the data to be encoded.
+     *
+     * @param dataLength length (i.e. number of bytes) of the data to be encoded
+     * @return size (i.e. number of bytes) of the base64 encoded output
+     */
+    public static long calcEncodedLength(long dataLength) {
+        long encLen = dataLength * 4 / 3;
+        encLen += (encLen + 4) % 4;
+        return encLen;
+    }
+
+    /**
+     * Pessimistically guesses the size (i.e. number of bytes) of the decoded
+     * output given the length (i.e. number of bytes) of the base64 encoded
+     * data.
+     *
+     * @param encLength length (i.e. number of bytes) of the base64 encoded data
+     * @return size (i.e. number of bytes) of the decoded output
+     */
+    public static long guessDecodedLength(long encLength) {
+        long decLen = encLength * 3 / 4;
+        return decLen + 3;
+    }
+
+    /**
+     * Outputs base64 representation of the specified stream data to a
+     * <code>Writer</code>.
+     *
+     * @param in     stream data to be encoded
+     * @param writer writer to output the encoded data
+     * @throws IOException if an i/o error occurs
+     */
+    public static void encode(InputStream in, Writer writer)
+            throws IOException {
+        // encode stream data in chunks;
+        // chunksize must be a multiple of 3 in order
+        // to avoid padding within output
+        byte[] buffer = new byte[9 * 1024];
+        int read;
+        while ((read = in.read(buffer)) > 0) {
+            encode(buffer, 0, read, writer);
+        }
+    }
+
+    /**
+     * Outputs base64 representation of the specified stream data to an
+     * <code>OutputStream</code>.
+     *
+     * @param in  stream data to be encoded
+     * @param out stream where the encoded data should be written to
+     * @throws IOException if an i/o error occurs
+     */
+    public static void encode(InputStream in, OutputStream out)
+            throws IOException {
+        Writer writer = new OutputStreamWriter(out, CHARSET);
+        encode(in, writer);
+    }
+
+    /**
+     * Outputs base64 representation of the specified data to a
+     * <code>Writer</code>.
+     *
+     * @param data data to be encoded
+     * @param off offset within data at which to start encoding
+     * @param len length of data to encode
+     * @param writer writer to output the encoded data
+     * @throws IOException if an i/o error occurs
+     */
+    public static void encode(byte[] data, int off, int len, Writer writer)
+            throws IOException {
+        if (len == 0) {
+            return;
+        }
+        if (len < 0 || off >= data.length
+                || len + off > data.length) {
+            throw new IllegalArgumentException();
+        }
+        char[] enc = new char[4];
+        while (len >= 3) {
+            int i = ((data[off] & 0xff) << 16)
+                    + ((data[off + 1] & 0xff) << 8)
+                    + (data[off + 2] & 0xff);
+            enc[0] = BASE64CHARS[i >> 18];
+            enc[1] = BASE64CHARS[(i >> 12) & 0x3f];
+            enc[2] = BASE64CHARS[(i >> 6) & 0x3f];
+            enc[3] = BASE64CHARS[i & 0x3f];
+            writer.write(enc, 0, 4);
+            off += 3;
+            len -= 3;
+        }
+        // add padding if necessary
+        if (len == 1) {
+            int i = data[off] & 0xff;
+            enc[0] = BASE64CHARS[i >> 2];
+            enc[1] = BASE64CHARS[(i << 4) & 0x3f];
+            enc[2] = BASE64PAD;
+            enc[3] = BASE64PAD;
+            writer.write(enc, 0, 4);
+        } else if (len == 2) {
+            int i = ((data[off] & 0xff) << 8) + (data[off + 1] & 0xff);
+            enc[0] = BASE64CHARS[i >> 10];
+            enc[1] = BASE64CHARS[(i >> 4) & 0x3f];
+            enc[2] = BASE64CHARS[(i << 2) & 0x3f];
+            enc[3] = BASE64PAD;
+            writer.write(enc, 0, 4);
+        }
+    }
+
+    /**
+     * Decode base64 encoded data.
+     *
+     * @param reader reader for the base64 encoded data to be decoded
+     * @param out stream where the decoded data should be written to
+     * @throws IOException if an i/o error occurs
+     */
+    public static void decode(Reader reader, OutputStream out)
+            throws IOException {
+        char[] chunk = new char[8192];
+        int read;
+        while ((read = reader.read(chunk)) > -1) {
+            decode(chunk, 0, read, out);
+        }
+    }
+
+    /**
+     * Decode base64 encoded data. The data read from the inputstream is
+     * assumed to be of charset "US-ASCII".
+     *
+     * @param in  inputstream of the base64 encoded data to be decoded
+     * @param out stream where the decoded data should be written to
+     * @throws IOException if an i/o error occurs
+     */
+    public static void decode(InputStream in, OutputStream out)
+            throws IOException {
+        decode(new InputStreamReader(in, CHARSET), out);
+    }
+
+    /**
+     * Decode base64 encoded data.
+     *
+     * @param data the base64 encoded data to be decoded
+     * @param out stream where the decoded data should be written to
+     * @throws IOException if an i/o error occurs
+     */
+    public static void decode(String data, OutputStream out)
+            throws IOException {
+        char[] chars = data.toCharArray();
+        decode(chars, 0, chars.length, out);
+    }
+
+    /**
+     * Decode base64 encoded data.
+     *
+     * @param chars the base64 encoded data to be decoded
+     * @param out stream where the decoded data should be written to
+     * @throws IOException if an i/o error occurs
+     */
+    public static void decode(char[] chars, OutputStream out)
+            throws IOException {
+        decode(chars, 0, chars.length, out);
+    }
+
+    /**
+     * Decode base64 encoded data.
+     *
+     * @param chars the base64 encoded data to be decoded
+     * @param off offset within data at which to start decoding
+     * @param len length of data to decode
+     * @param out stream where the decoded data should be written to
+     * @throws IOException if an i/o error occurs
+     */
+    public static void decode(char[] chars, int off, int len, OutputStream out)
+            throws IOException {
+        if (len == 0) {
+            return;
+        }
+        if (len < 0 || off >= chars.length
+                || len + off > chars.length) {
+            throw new IllegalArgumentException();
+        }
+        char[] chunk = new char[4];
+        byte[] dec = new byte[3];
+        int posChunk = 0;
+        // decode in chunks of 4 characters
+        for (int i = off; i < (off + len); i++) {
+            char c = chars[i];
+            if (c < DECODETABLE.length && DECODETABLE[c] != 0x7f
+                    || c == BASE64PAD) {
+                chunk[posChunk++] = c;
+                if (posChunk == chunk.length) {
+                    int b0 = DECODETABLE[chunk[0]];
+                    int b1 = DECODETABLE[chunk[1]];
+                    int b2 = DECODETABLE[chunk[2]];
+                    int b3 = DECODETABLE[chunk[3]];
+                    if (chunk[3] == BASE64PAD && chunk[2] == BASE64PAD) {
+                        dec[0] = (byte) (b0 << 2 & 0xfc | b1 >> 4 & 0x3);
+                        out.write(dec, 0, 1);
+                    } else if (chunk[3] == BASE64PAD) {
+                        dec[0] = (byte) (b0 << 2 & 0xfc | b1 >> 4 & 0x3);
+                        dec[1] = (byte) (b1 << 4 & 0xf0 | b2 >> 2 & 0xf);
+                        out.write(dec, 0, 2);
+                    } else {
+                        dec[0] = (byte) (b0 << 2 & 0xfc | b1 >> 4 & 0x3);
+                        dec[1] = (byte) (b1 << 4 & 0xf0 | b2 >> 2 & 0xf);
+                        dec[2] = (byte) (b2 << 6 & 0xc0 | b3 & 0x3f);
+                        out.write(dec, 0, 3);
+                    }
+                    posChunk = 0;
+                }
+            } else {
+                throw new IllegalArgumentException("specified data is not base64 encoded");
+            }
+        }
+    }
+}

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/Base64.java
------------------------------------------------------------------------------
    svn = 

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/Base64.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/IteratorHelper.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/IteratorHelper.java?rev=180346&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/IteratorHelper.java (added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/IteratorHelper.java Mon Jun  6 10:36:09 2005
@@ -0,0 +1,134 @@
+/*
+ * 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.util;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.Property;
+import javax.jcr.PropertyIterator;
+import javax.jcr.nodetype.NodeType;
+import javax.jcr.nodetype.NodeTypeIterator;
+import java.util.Collection;
+import java.util.Iterator;
+
+/**
+ * <code>IteratorHelper</code> is a utility class which
+ * wraps an iterator and implements the various typed iterator
+ * interfaces.
+ */
+public class IteratorHelper implements NodeIterator, PropertyIterator,
+    NodeTypeIterator {
+
+    static final long UNDETERMINED_SIZE = -1;
+
+    private final Iterator iter;
+    private long size;
+    private long pos;
+
+    /**
+     * Constructs an <code>IteratorHelper</code> which is backed
+     * by a <code>java.util.Collection</code>.
+     *
+     * @param c collection which should be iterated over.
+     */
+    public IteratorHelper(Collection c) {
+        this(c.iterator());
+        size = c.size();
+    }
+
+    /**
+     * Constructs an <code>IteratorHelper</code> which is wrapping
+     * a <code>java.util.Iterator</code>.
+     *
+     * @param iter iterator which should be wrapped.
+     */
+    public IteratorHelper(Iterator iter) {
+        this.iter = iter;
+        pos = 0;
+        size = UNDETERMINED_SIZE;
+    }
+
+    /**
+     * @see javax.jcr.RangeIterator#skip(long)
+     */
+    public void skip(long skipNum) {
+        while (skipNum-- > 0) {
+            next();
+        }
+    }
+
+    /**
+     * @see javax.jcr.RangeIterator#getSize()
+     */
+    public long getSize() {
+        return size;
+    }
+
+    /**
+     * @see javax.jcr.RangeIterator#getPosition()
+     */
+    public long getPosition() {
+        return pos;
+    }
+
+    /**
+     * @see javax.jcr.RangeIterator#hasNext()
+     */
+    public boolean hasNext() {
+        return iter.hasNext();
+    }
+
+    /**
+     * @see javax.jcr.RangeIterator#next()
+     */
+    public Object next() {
+        // all typed nextXXX methods should
+        // delegate to this method
+        Object obj = iter.next();
+        // increment position
+        pos++;
+        return obj;
+    }
+
+    /**
+     * @see javax.jcr.RangeIterator#remove()
+     */
+    public void remove() {
+        iter.remove();
+    }
+
+    /**
+     * @see javax.jcr.NodeIterator#nextNode()
+     */
+    public Node nextNode() {
+        return (Node) next();
+    }
+
+    /**
+     * @see javax.jcr.PropertyIterator#nextProperty()
+     */
+    public Property nextProperty() {
+        return (Property) next();
+    }
+
+    /**
+     * @see javax.jcr.nodetype.NodeTypeIterator#nextNodeType()
+     */
+    public NodeType nextNodeType() {
+        return (NodeType) next();
+    }
+}

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/IteratorHelper.java
------------------------------------------------------------------------------
    svn = 

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/commons/src/java/org/apache/jackrabbit/util/IteratorHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message