jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r368683 [1/8] - in /incubator/jackrabbit/trunk/contrib/jcr-server: client/ client/src/java/org/apache/jackrabbit/webdav/client/methods/ server/ server/src/java/org/apache/jackrabbit/server/ server/src/java/org/apache/jackrabbit/server/io/ s...
Date Fri, 13 Jan 2006 11:13:30 GMT
Author: angela
Date: Fri Jan 13 03:11:35 2006
New Revision: 368683

URL: http://svn.apache.org/viewcvs?rev=368683&view=rev
Log:
JCR-258 - remove JDOM dependency from jcr-server contribution
JCR-295 - usage of Cache-Control header 
JCR-297 - log output while parsing xml
minor consistency issues and improvements

Added:
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CheckinMethod.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CheckoutMethod.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CopyMethod.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/LabelMethod.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/LockMethod.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MergeMethod.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MkColMethod.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MkWorkspaceMethod.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MoveMethod.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OrderPatchMethod.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PropPatchMethod.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/UnLockMethod.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/UpdateMethod.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/VersionControlMethod.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/NamespacesProperty.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/Status.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/header/Header.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/header/LabelHeader.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/header/OverwriteHeader.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/header/TimeoutHeader.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/observation/EventBundle.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/observation/EventType.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/observation/Filter.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/property/DavPropertyNameIterator.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/property/PropContainer.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/LabelSetProperty.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/DomUtil.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/ElementIterator.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/Namespace.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/XmlSerializable.java   (with props)
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/package.html   (with props)
Removed:
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/nodetype/NodeTypeElement.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/util/XmlUtil.java
Modified:
    incubator/jackrabbit/trunk/contrib/jcr-server/client/project.xml
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/DavMethodBase.java
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OptionsMethod.java
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PropFindMethod.java
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/ReportMethod.java
    incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/SearchMethod.java
    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/ExportContextImpl.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/jcr/AbstractItemResource.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/AbstractResource.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DavResourceFactoryImpl.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DefaultItemCollection.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DefaultItemResource.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/ItemResourceConstants.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/JcrDavException.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/RootCollection.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/RootItemCollection.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/VersionControlledItemCollection.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/lock/JcrActiveLock.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/nodetype/ItemDefinitionImpl.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/nodetype/NodeDefinitionImpl.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/nodetype/NodeTypeConstants.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/nodetype/NodeTypeProperty.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/nodetype/PropertyDefinitionImpl.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/observation/SubscriptionImpl.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/observation/SubscriptionManagerImpl.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/LengthsProperty.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/ValuesProperty.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/search/SearchResourceImpl.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/search/SearchResultProperty.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/transaction/TxLockManagerImpl.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/VersionHistoryItemCollection.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/VersionItemCollection.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/report/ExportViewReport.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/report/LocateByUuidReport.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/report/LocateCorrespondingNodeReport.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/report/NodeTypesReport.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/report/RegisteredNamespacesReport.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/report/RepositoryDescriptorsReport.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/DavSessionImpl.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/simple/DavSessionProviderImpl.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/simple/LocatorFactoryImpl.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/simple/ResourceConfig.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webapp/project.xml
    incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/SimpleWebdavServlet.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/project.xml
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/DavConstants.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/DavException.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/DavMethods.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/DavResource.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/DavServletRequest.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/DavServletResponse.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/MultiStatus.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/MultiStatusResponse.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/header/CodedUrlHeader.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/header/DepthHeader.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/header/IfHeader.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/lock/AbstractActiveLock.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/lock/AbstractLockEntry.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/lock/ActiveLock.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/lock/LockDiscovery.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/lock/LockEntry.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/lock/LockInfo.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/lock/Scope.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/lock/SupportedLock.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/lock/Type.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/observation/EventDiscovery.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/observation/ObservationConstants.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/observation/Subscription.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/observation/SubscriptionDiscovery.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/observation/SubscriptionInfo.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/ordering/OrderPatch.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/ordering/OrderingConstants.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/ordering/OrderingDavServletRequest.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/ordering/OrderingType.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/ordering/Position.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/property/AbstractDavProperty.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/property/DavProperty.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/property/DavPropertyName.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/property/DavPropertySet.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/property/DefaultDavProperty.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/property/HrefProperty.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/property/ResourceType.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/search/QueryGrammerSet.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/search/SearchConstants.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/search/SearchInfo.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/transaction/TransactionConstants.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/transaction/TransactionInfo.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/transaction/TxLockManager.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/util/package.html
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/DeltaVConstants.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/DeltaVServletRequest.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/LabelInfo.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/MergeInfo.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/OptionsInfo.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/OptionsResponse.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/SupportedMethodSetProperty.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/UpdateInfo.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/report/ExpandPropertyReport.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/report/LocateByHistoryReport.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/report/Report.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/report/ReportInfo.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/report/ReportType.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/report/SupportedReportSetProperty.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/report/VersionTreeReport.java

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=368683&r1=368682&r2=368683&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/project.xml (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/project.xml Fri Jan 13 03:11:35 2006
@@ -48,11 +48,6 @@
         
         <!-- non-jackrabbit dependencies -->
         <dependency>
-            <groupId>jdom</groupId>
-            <artifactId>jdom</artifactId>
-            <version>1.0</version>
-        </dependency>
-        <dependency>
             <groupId>log4j</groupId>
             <artifactId>log4j</artifactId>
             <version>1.2.8</version>

Added: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CheckinMethod.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CheckinMethod.java?rev=368683&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CheckinMethod.java (added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CheckinMethod.java Fri Jan 13 03:11:35 2006
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * 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.webdav.client.methods;
+
+import org.apache.log4j.Logger;
+import org.apache.jackrabbit.webdav.DavMethods;
+import org.apache.jackrabbit.webdav.version.DeltaVConstants;
+
+/**
+ * <code>CheckinMethod</code>...
+ */
+public class CheckinMethod extends DavMethodBase {
+
+    private static Logger log = Logger.getLogger(CheckinMethod.class);
+
+    public CheckinMethod(String uri) {
+        super(uri);
+    }
+
+    public String getVersionUri() {
+        checkUsed();
+        return getResponseHeader(DeltaVConstants.HEADER_LOCATION).getValue();
+    }
+
+    /**
+     * @see org.apache.commons.httpclient.HttpMethod#getName()
+     */
+    public String getName() {
+        return DavMethods.METHOD_CHECKIN;
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CheckinMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CheckinMethod.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CheckoutMethod.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CheckoutMethod.java?rev=368683&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CheckoutMethod.java (added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CheckoutMethod.java Fri Jan 13 03:11:35 2006
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * 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.webdav.client.methods;
+
+import org.apache.log4j.Logger;
+import org.apache.jackrabbit.webdav.DavMethods;
+
+/**
+ * <code>CheckoutMethod</code>...
+ */
+public class CheckoutMethod extends DavMethodBase {
+
+    private static Logger log = Logger.getLogger(CheckoutMethod.class);
+
+
+    public CheckoutMethod(String uri) {
+        super(uri);
+    }
+
+    /**
+     * @see org.apache.commons.httpclient.HttpMethod#getName()
+     */
+    public String getName() {
+        return DavMethods.METHOD_CHECKOUT;
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CheckoutMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CheckoutMethod.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CopyMethod.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CopyMethod.java?rev=368683&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CopyMethod.java (added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CopyMethod.java Fri Jan 13 03:11:35 2006
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * 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.webdav.client.methods;
+
+import org.apache.log4j.Logger;
+import org.apache.jackrabbit.webdav.DavMethods;
+import org.apache.jackrabbit.webdav.DavConstants;
+import org.apache.jackrabbit.webdav.header.DepthHeader;
+import org.apache.jackrabbit.webdav.header.OverwriteHeader;
+
+/**
+ * <code>CopyMethod</code>...
+ */
+public class CopyMethod extends DavMethodBase {
+
+    private static Logger log = Logger.getLogger(CopyMethod.class);
+
+    /**
+     * Create a new <code>CopyMethod</code>
+     *
+     * @param uri
+     * @param destinationUri
+     */
+    public CopyMethod(String uri, String destinationUri, boolean overwrite) {
+        this(uri, destinationUri, overwrite, false);
+    }
+
+    /**
+     * Create a new <code>CopyMethod</code>
+     *
+     * @param uri
+     * @param destinationUri
+     * @param shallow
+     */
+    public CopyMethod(String uri, String destinationUri, boolean overwrite, boolean shallow) {
+        super(uri);
+        setRequestHeader(DavConstants.HEADER_DESTINATION, destinationUri);
+        setRequestHeader(new OverwriteHeader(overwrite));
+        if (shallow) {
+            setRequestHeader(new DepthHeader(false));
+        }
+    }
+
+    /**
+     * @see org.apache.commons.httpclient.HttpMethod#getName()
+     */
+    public String getName() {
+        return DavMethods.METHOD_COPY;
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CopyMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/CopyMethod.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Modified: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/DavMethodBase.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/DavMethodBase.java?rev=368683&r1=368682&r2=368683&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/DavMethodBase.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/DavMethodBase.java Fri Jan 13 03:11:35 2006
@@ -22,15 +22,20 @@
 import org.apache.jackrabbit.webdav.DavException;
 import org.apache.jackrabbit.webdav.DavServletResponse;
 import org.apache.jackrabbit.webdav.MultiStatus;
-import org.jdom.input.SAXBuilder;
-import org.jdom.Document;
-import org.jdom.JDOMException;
-import org.jdom.output.XMLOutputter;
-import org.jdom.output.Format;
-import org.xml.sax.ContentHandler;
-
+import org.apache.jackrabbit.webdav.xml.XmlSerializable;
+import org.apache.jackrabbit.webdav.header.Header;
+import org.apache.xml.serialize.OutputFormat;
+import org.apache.xml.serialize.XMLSerializer;
+import org.xml.sax.SAXException;
+import org.w3c.dom.Element;
+import org.w3c.dom.Document;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
 import java.io.InputStream;
 import java.io.IOException;
+import java.io.ByteArrayOutputStream;
 
 /**
  * <code>DavMethodBase</code>...
@@ -38,70 +43,111 @@
 public abstract class DavMethodBase extends EntityEnclosingMethod implements DavConstants {
 
     private static Logger log = Logger.getLogger(DavMethodBase.class);
+    static final DocumentBuilderFactory BUILDER_FACTORY = DocumentBuilderFactory.newInstance();
+    static {
+       BUILDER_FACTORY.setNamespaceAware(true);
+    }
 
     public DavMethodBase(String uri) {
 	super(uri);
     }
 
-    public void setRequestBody(Document bodyDocument) {
-	String reqBody = new XMLOutputter(Format.getRawFormat()).outputString(bodyDocument);
-	setRequestBody(reqBody);
+    /**
+     *
+     * @param header
+     */
+    public void setRequestHeader(Header header) {
+        setRequestHeader(header.getHeaderName(), header.getHeaderValue());
     }
 
-    public Document getReponseBodyAsDocument() throws IOException, JDOMException {
-	SAXBuilder builder = new SAXBuilder();
-	return builder.build(getResponseBodyAsStream());
+    /**
+     *
+     * @param requestBody
+     * @throws IOException
+     */
+    public void setRequestBody(XmlSerializable requestBody) throws IOException {
+        try {
+            ByteArrayOutputStream out = new ByteArrayOutputStream();
+            Document doc = BUILDER_FACTORY.newDocumentBuilder().newDocument();
+            doc.appendChild(requestBody.toXml(doc));
+
+            OutputFormat format = new OutputFormat("xml", "UTF-8", true);
+            XMLSerializer serializer = new XMLSerializer(out, format);
+            serializer.setNamespaces(true);
+            serializer.asDOMSerializer().serialize(doc);
+            setRequestBody(out.toString());
+        } catch (ParserConfigurationException e) {
+            throw new IOException(e.getMessage());
+        }
     }
 
     /**
+     * Return the response body as <code>MultiStatus</code> object.
      *
      * @return
-     * @throws IOException
+     * @throws IOException if the response body could not be parsed
+     * @throws DavException if the status code is other than MultiStatus
      */
-    public DavException getResponseException() throws IOException {
+    public MultiStatus getResponseBodyAsMultiStatus() throws IOException, DavException {
 	checkUsed();
-	if (getStatusCode() < DavServletResponse.SC_BAD_REQUEST) {
-	    log.warn("Cannot retrieve exception from successful response.");
+        if (getStatusCode() == DavServletResponse.SC_MULTI_STATUS) {
+            return MultiStatus.createFromXml(getRootElement());
+        } else {
+            throw new DavException(getStatusCode(), getName() + " resulted with unexpected status code: " + getStatusCode());
+        }
+    }
+
+    /**
+     * Parse the response body into an Xml <code>Document</code>.
+     *
+     * @return Xml document or <code>null</code> if the response stream is
+     * <code>null</code>.
+     * @throws IOException if the parsing fails.
+     */
+    public Document getResponseBodyAsDocument() throws IOException {
+        InputStream in = getResponseBodyAsStream();
+        if (in == null) {
 	    return null;
 	}
-	InputStream in = this.getResponseBodyAsStream();
-	if (in != null) {
 	    try {
-		SAXBuilder builder = new SAXBuilder(false);
-		Document responseDocument = builder.build(in);
-		return new DavException(getStatusCode(), getStatusText(), responseDocument.getRootElement());
-	    } catch (JDOMException e) {
-		log.error(e.getMessage());
+            DocumentBuilder docBuilder = BUILDER_FACTORY.newDocumentBuilder();
+            Document document = docBuilder.parse(in);
+            return document;
+        } catch (ParserConfigurationException e) {
+            throw new IOException(e.getMessage());
+        } catch (SAXException e) {
+            throw new IOException(e.getMessage());
 	    }
 	}
-	// no or unparsable response body
-	return new DavException(getStatusCode(), getStatusText());
-    }
 
-    public void parseResponse(ContentHandler contentHandler) throws IOException, DavException {
-        // todo
+    /**
+     * 
+     * @return
+     * @throws IOException
+     */
+    Element getRootElement() throws IOException {
+        Document document = getResponseBodyAsDocument();
+        if (document != null) {
+            return document.getDocumentElement();
+    }
+        return null;
     }
 
-    public MultiStatus getResponseBodyAsMultiStatus() throws IOException, DavException {
+    /**
+     *
+     * @return
+     * @throws IOException
+     */
+    public DavException getResponseException() throws IOException {
         checkUsed();
-        if (getStatusCode() == DavServletResponse.SC_MULTI_STATUS) {
-            try {
-                return MultiStatus.createFromXml(getReponseBodyAsDocument());
-            } catch (JDOMException e) {
-                log.error(e.getMessage());
+	if (getStatusCode() < DavServletResponse.SC_BAD_REQUEST) {
+	    log.warn("Cannot retrieve exception from successful response.");
                 return null;
             }
-        } else {
-            throw new DavException(getStatusCode(), getName() + " resulted with unexpected status code: " + getStatusCode());
-        }
-    }
 
-    public void parseMultiStatus(ContentHandler contentHandler) throws IOException, DavException {
-        checkUsed();
-        if (getStatusCode() == DavServletResponse.SC_MULTI_STATUS) {
-            /// todo...
-        } else {
-            throw new DavException(getStatusCode(), getName() + " resulted with unexpected status code: " + getStatusCode());
-        }
+        // todo: build exception from response body if present.
+
+	// fallback: no or unparsable response body
+	return new DavException(getStatusCode(), getStatusText());
     }
 }

Added: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/LabelMethod.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/LabelMethod.java?rev=368683&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/LabelMethod.java (added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/LabelMethod.java Fri Jan 13 03:11:35 2006
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * 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.webdav.client.methods;
+
+import org.apache.log4j.Logger;
+import org.apache.jackrabbit.webdav.DavMethods;
+import org.apache.jackrabbit.webdav.version.LabelInfo;
+import org.apache.jackrabbit.webdav.header.DepthHeader;
+
+import java.io.IOException;
+
+/**
+ * <code>LabelMethod</code>...
+ */
+public class LabelMethod extends DavMethodBase {
+
+    private static Logger log = Logger.getLogger(LabelMethod.class);
+
+    /**
+     * Create a new <code>LabelMethod</code> with the default depth.
+     *
+     * @param uri
+     * @param label
+     * @param type
+     */
+    public LabelMethod(String uri, String label, int type) throws IOException {
+        this(uri, new LabelInfo(label, type));
+    }
+
+    /**
+     * Create a new <code>LabelMethod</code>
+     *
+     * @param uri
+     * @param label
+     * @param type
+     * @param depth
+     */
+    public LabelMethod(String uri, String label, int type, int depth)
+        throws IOException {
+        this(uri, new LabelInfo(label, type, depth));
+    }
+
+    /**
+     * Create a new <code>LabelMethod</code>
+     *
+     * @param uri
+     * @param labelInfo
+     */
+    public LabelMethod(String uri, LabelInfo labelInfo) throws IOException {
+        super(uri);
+        setRequestHeader(new DepthHeader(labelInfo.getDepth()));
+        setRequestBody(labelInfo);
+    }
+
+    /**
+     * @see org.apache.commons.httpclient.HttpMethod#getName()
+     */
+    public String getName() {
+        return DavMethods.METHOD_LABEL;
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/LabelMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/LabelMethod.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/LockMethod.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/LockMethod.java?rev=368683&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/LockMethod.java (added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/LockMethod.java Fri Jan 13 03:11:35 2006
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * 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.webdav.client.methods;
+
+import org.apache.log4j.Logger;
+import org.apache.jackrabbit.webdav.DavMethods;
+import org.apache.jackrabbit.webdav.DavConstants;
+import org.apache.jackrabbit.webdav.header.DepthHeader;
+import org.apache.jackrabbit.webdav.header.TimeoutHeader;
+import org.apache.jackrabbit.webdav.header.IfHeader;
+import org.apache.jackrabbit.webdav.header.CodedUrlHeader;
+import org.apache.jackrabbit.webdav.lock.Scope;
+import org.apache.jackrabbit.webdav.lock.Type;
+import org.apache.jackrabbit.webdav.lock.LockInfo;
+import org.apache.jackrabbit.webdav.lock.ActiveLock;
+
+import java.io.IOException;
+
+/**
+ * <code>LockMethod</code>...
+ */
+public class LockMethod extends DavMethodBase {
+
+    private static Logger log = Logger.getLogger(LockMethod.class);
+
+    /**
+     * Creates a new <code>LockMethod</code>.
+     *
+     * @param uri
+     * @param lockScope
+     * @param lockType
+     * @param owner
+     * @param timeout
+     * @param isDeep
+     */
+    public LockMethod(String uri, Scope lockScope, Type lockType, String owner,
+                      long timeout, boolean isDeep) throws IOException {
+        this(uri, new LockInfo(lockScope, lockType, owner, timeout, isDeep));
+    }
+
+    /**
+     * Creates a new <code>LockMethod</code>.
+     *
+     * @param uri
+     * @param lockInfo
+     */
+    public LockMethod(String uri, LockInfo lockInfo) throws IOException {
+        super(uri);
+        if (lockInfo != null) {
+            TimeoutHeader th = new TimeoutHeader(lockInfo.getTimeout());
+            setRequestHeader(th);
+            if (!lockInfo.isRefreshLock()) {
+                DepthHeader dh = new DepthHeader(lockInfo.isDeep());
+                setRequestHeader(dh);
+                setRequestHeader(DavConstants.HEADER_CONTENT_TYPE, "text/xml; charset=UTF-8");
+                setRequestBody(lockInfo);
+            }
+        }
+    }
+
+    /**
+     * Create a new 'Refresh' lock method.
+     *
+     * @param uri
+     * @param timeout
+     * @param lockTokens used to build the untagged If header.
+     * @see IfHeader
+     */
+    public LockMethod(String uri, long timeout, String[] lockTokens) {
+        super(uri);
+        TimeoutHeader th = new TimeoutHeader(timeout);
+        setRequestHeader(th);
+        IfHeader ifh = new IfHeader(lockTokens);
+        setRequestHeader(ifh);
+    }
+
+    /**
+     * @see org.apache.commons.httpclient.HttpMethod#getName()
+     */
+    public String getName() {
+        return DavMethods.METHOD_LOCK;
+    }
+
+    public ActiveLock getResponseAsLock() throws IOException {
+        checkUsed();
+        // todo -> build lockdiscovery-prop -> retrieve activelock
+        return null;
+    }
+
+    public String getLockToken() {
+        checkUsed();
+        CodedUrlHeader cuh = new CodedUrlHeader(DavConstants.HEADER_LOCK_TOKEN, getResponseHeader(DavConstants.HEADER_LOCK_TOKEN).getValue());
+        return cuh.getCodedUrl();
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/LockMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/LockMethod.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MergeMethod.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MergeMethod.java?rev=368683&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MergeMethod.java (added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MergeMethod.java Fri Jan 13 03:11:35 2006
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * 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.webdav.client.methods;
+
+import org.apache.log4j.Logger;
+import org.apache.jackrabbit.webdav.DavMethods;
+import org.apache.jackrabbit.webdav.version.MergeInfo;
+
+import java.io.IOException;
+
+/**
+ * <code>MergeMethod</code>...
+ */
+public class MergeMethod extends DavMethodBase {
+
+    private static Logger log = Logger.getLogger(MergeMethod.class);
+
+    public MergeMethod(String uri, MergeInfo mergeInfo) throws IOException {
+        super(uri);
+        setRequestBody(mergeInfo);
+    }
+
+    /**
+     * @see org.apache.commons.httpclient.HttpMethod#getName()
+     */
+    public String getName() {
+        return DavMethods.METHOD_MERGE;
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MergeMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MergeMethod.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MkColMethod.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MkColMethod.java?rev=368683&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MkColMethod.java (added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MkColMethod.java Fri Jan 13 03:11:35 2006
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * 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.webdav.client.methods;
+
+import org.apache.log4j.Logger;
+import org.apache.jackrabbit.webdav.DavMethods;
+
+/**
+ * <code>MkColMethod</code>...
+ */
+public class MkColMethod extends DavMethodBase {
+
+    private static Logger log = Logger.getLogger(MkColMethod.class);
+
+    public MkColMethod(String uri) {
+        super(uri);
+    }
+
+    /**
+     * @see org.apache.commons.httpclient.HttpMethod#getName()
+     */
+    public String getName() {
+        return DavMethods.METHOD_MKCOL;
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MkColMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MkColMethod.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MkWorkspaceMethod.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MkWorkspaceMethod.java?rev=368683&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MkWorkspaceMethod.java (added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MkWorkspaceMethod.java Fri Jan 13 03:11:35 2006
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * 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.webdav.client.methods;
+
+import org.apache.log4j.Logger;
+import org.apache.jackrabbit.webdav.DavMethods;
+
+/**
+ * <code>MkWorkspaceMethod</code>...
+ */
+public class MkWorkspaceMethod extends DavMethodBase {
+
+    private static Logger log = Logger.getLogger(MkWorkspaceMethod.class);
+
+    public MkWorkspaceMethod(String uri) {
+        super(uri);
+    }
+
+    /**
+     * @see org.apache.commons.httpclient.HttpMethod#getName()
+     */
+    public String getName() {
+        return DavMethods.METHOD_MKWORKSPACE;
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MkWorkspaceMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MkWorkspaceMethod.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MoveMethod.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MoveMethod.java?rev=368683&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MoveMethod.java (added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MoveMethod.java Fri Jan 13 03:11:35 2006
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * 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.webdav.client.methods;
+
+import org.apache.log4j.Logger;
+import org.apache.jackrabbit.webdav.header.OverwriteHeader;
+import org.apache.jackrabbit.webdav.DavConstants;
+import org.apache.jackrabbit.webdav.DavMethods;
+
+/**
+ * <code>MoveMethod</code>...
+ */
+public class MoveMethod extends DavMethodBase {
+
+    private static Logger log = Logger.getLogger(MoveMethod.class);
+
+    public MoveMethod(String uri, String destinationUri, boolean overwrite) {
+        super(uri);
+        setRequestHeader(DavConstants.HEADER_DESTINATION, destinationUri);
+        setRequestHeader(new OverwriteHeader(overwrite));
+    }
+
+    /**
+     * @see org.apache.commons.httpclient.HttpMethod#getName()
+     */
+    public String getName() {
+        return DavMethods.METHOD_MOVE;
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MoveMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/MoveMethod.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Modified: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OptionsMethod.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OptionsMethod.java?rev=368683&r1=368682&r2=368683&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OptionsMethod.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OptionsMethod.java Fri Jan 13 03:11:35 2006
@@ -18,6 +18,12 @@
 
 import org.apache.log4j.Logger;
 import org.apache.jackrabbit.webdav.DavMethods;
+import org.apache.jackrabbit.webdav.DavConstants;
+import org.apache.jackrabbit.webdav.version.OptionsInfo;
+import org.apache.jackrabbit.webdav.version.OptionsResponse;
+import org.w3c.dom.Element;
+
+import java.io.IOException;
 
 /**
  * <code>OptionsMethod</code>...
@@ -30,7 +36,37 @@
 	super(uri);
     }
 
+    public OptionsMethod(String uri, String[] optionsEntries) throws IOException {
+        this(uri, new OptionsInfo(optionsEntries));
+    }
+
+    public OptionsMethod(String uri, OptionsInfo optionsInfo) throws IOException {
+        super(uri);
+        if (optionsInfo != null) {
+            setRequestHeader(DavConstants.HEADER_CONTENT_TYPE, "text/xml; charset=UTF-8");
+            setRequestBody(optionsInfo);
+        }
+    }
+
+    /**
+     * @see org.apache.commons.httpclient.HttpMethod#getName()
+     */
     public String getName() {
 	return DavMethods.METHOD_OPTIONS;
+    }
+
+    /**
+     *
+     * @return
+     * @throws IOException
+     */
+    public OptionsResponse getResponseAsOptionsResponse() throws IOException {
+        checkUsed();
+        OptionsResponse or = null;
+        Element rBody = getRootElement();
+        if (rBody != null) {
+            or = OptionsResponse.createFromXml(rBody);
+        }
+        return or;
     }
 }

Added: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OrderPatchMethod.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OrderPatchMethod.java?rev=368683&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OrderPatchMethod.java (added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OrderPatchMethod.java Fri Jan 13 03:11:35 2006
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * 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.webdav.client.methods;
+
+import org.apache.log4j.Logger;
+import org.apache.jackrabbit.webdav.DavMethods;
+import org.apache.jackrabbit.webdav.DavConstants;
+import org.apache.jackrabbit.webdav.ordering.OrderPatch;
+import org.apache.jackrabbit.webdav.ordering.Position;
+import org.apache.jackrabbit.webdav.ordering.OrderingConstants;
+
+import java.io.IOException;
+
+/**
+ * <code>OrderPatchMethod</code>...
+ */
+public class OrderPatchMethod extends DavMethodBase {
+
+    private static Logger log = Logger.getLogger(OrderPatchMethod.class);
+
+    /**
+     * Create a new <code>OrderPatchMethod</code> with the given order patch
+     * object.
+     *
+     * @param uri
+     * @param orderPatch
+     */
+    public OrderPatchMethod(String uri, OrderPatch orderPatch) throws IOException {
+        super(uri);
+        setRequestHeader(DavConstants.HEADER_CONTENT_TYPE, "text/xml; charset=UTF-8");
+        setRequestBody(orderPatch);
+    }
+
+    /**
+     * Create a new <code>OrderPatchMethod</code> that reorders the members
+     * of the resource identified by 'uri': the member identified by 'memberSegment'
+     * is moved to the first or to the last position, respectively.<br>
+     * See the constructor taking an <code>OrderPatch</code> object for a ORDERPATCH call
+     * that reorders multiple members at once.
+     *
+     * @param uri
+     * @param orderingHref
+     * @param memberSegment
+     * @param first
+     */
+    public OrderPatchMethod(String uri, String orderingHref, String memberSegment, boolean first) throws IOException {
+        super(uri);
+        String orderType = (first) ? OrderingConstants.XML_FIRST : OrderingConstants.XML_LAST;
+        Position p = new Position(orderType);
+        OrderPatch op = new OrderPatch(orderingHref, new OrderPatch.Member(memberSegment, p));
+        setRequestHeader(DavConstants.HEADER_CONTENT_TYPE, "text/xml; charset=UTF-8");
+        setRequestBody(op);
+    }
+
+    /**
+     * Create a new <code>OrderPatchMethod</code> that reorders the members
+     * of the resource identified by 'uri': the member identified by 'memberSegment'
+     * is reordered before or after the member identified by 'targetMemberSegmet'.<br>
+     * See the constructor taking an <code>OrderPatch</code> object for a ORDERPATCH call
+     * that reorders multiple members at once.
+     *
+     * @param uri
+     * @param orderingHref
+     * @param memberSegment
+     * @param targetMemberSegmet
+     * @param above
+     */
+    public OrderPatchMethod(String uri, String orderingHref, String memberSegment, String targetMemberSegmet, boolean above) throws IOException {
+        super(uri);
+        String orderType = (above) ? OrderingConstants.XML_AFTER : OrderingConstants.XML_BEFORE;
+        Position p = new Position(orderType, targetMemberSegmet);
+        OrderPatch op = new OrderPatch(orderingHref, new OrderPatch.Member(memberSegment, p));
+        setRequestHeader(DavConstants.HEADER_CONTENT_TYPE, "text/xml; charset=UTF-8");
+        setRequestBody(op);
+    }
+
+    /**
+     * @see org.apache.commons.httpclient.HttpMethod#getName()
+     */
+    public String getName() {
+        return DavMethods.METHOD_ORDERPATCH;
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OrderPatchMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/OrderPatchMethod.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

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=368683&r1=368682&r2=368683&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 Fri Jan 13 03:11:35 2006
@@ -19,9 +19,17 @@
 import org.apache.log4j.Logger;
 import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
 import org.apache.jackrabbit.webdav.DavMethods;
+import org.apache.jackrabbit.webdav.DavConstants;
+import org.apache.jackrabbit.webdav.xml.DomUtil;
 import org.apache.jackrabbit.webdav.header.DepthHeader;
-import org.jdom.Element;
-import org.jdom.Document;
+import org.apache.xml.serialize.XMLSerializer;
+import org.apache.xml.serialize.OutputFormat;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.IOException;
+import java.io.ByteArrayOutputStream;
 
 /**
  * <code>PropFindMethod</code>...
@@ -30,46 +38,68 @@
 
     private static Logger log = Logger.getLogger(PropFindMethod.class);
 
-    public PropFindMethod(String uri) {
+    public PropFindMethod(String uri) throws IOException {
         this(uri, PROPFIND_ALL_PROP, new DavPropertyNameSet(), DEPTH_INFINITY);
     }
 
-    public PropFindMethod(String uri, DavPropertyNameSet propNameSet, int depth) {
+    public PropFindMethod(String uri, DavPropertyNameSet propNameSet, int depth)
+        throws IOException {
         this(uri, PROPFIND_BY_PROPERTY, propNameSet, depth);
     }
 
-    public PropFindMethod(String uri, int propfindType, int depth) {
+    public PropFindMethod(String uri, int propfindType, int depth)
+        throws IOException {
         this(uri, propfindType, new DavPropertyNameSet(), depth);
     }
 
-    private PropFindMethod(String uri, int propfindType, DavPropertyNameSet propNameSet, int depth) {
+    private PropFindMethod(String uri, int propfindType, DavPropertyNameSet propNameSet,
+                           int depth) throws IOException {
         super(uri);
 
         DepthHeader dh = new DepthHeader(depth);
         setRequestHeader(dh.getHeaderName(), dh.getHeaderValue());
-        setRequestHeader("Content-Type","text/xml; charset=UTF-8");
+
+        setRequestHeader(DavConstants.HEADER_CONTENT_TYPE, "text/xml; charset=UTF-8");
 
         // build the request body
-        Element propfind = new Element(XML_PROPFIND, NAMESPACE);
+        try {
+            // create the document and attach the root element
+            Document document = BUILDER_FACTORY.newDocumentBuilder().newDocument();
+            Element propfind = DomUtil.createElement(document, XML_PROPFIND, NAMESPACE);
+            document.appendChild(propfind);
+
+            // fill the propfind element
         switch (propfindType) {
             case PROPFIND_ALL_PROP:
-                propfind.addContent(new Element(XML_ALLPROP, NAMESPACE));
+                    propfind.appendChild(DomUtil.createElement(document, XML_ALLPROP, NAMESPACE));
                 break;
             case PROPFIND_PROPERTY_NAMES:
-                propfind.addContent(new Element(XML_PROPNAME, NAMESPACE));
+                    propfind.appendChild(DomUtil.createElement(document, XML_PROPNAME, NAMESPACE));
                 break;
             default:
                 if (propNameSet == null) {
-                    propfind.addContent(new Element(XML_PROP, NAMESPACE));
+                        propfind.appendChild(DomUtil.createElement(document, XML_PROP, NAMESPACE));
                 } else {
-                    propfind.addContent(propNameSet.toXml());
+                        propfind.appendChild(propNameSet.toXml(document));
                 }
                 break;
         }
-        Document propfindBody = new Document(propfind);
-        setRequestBody(propfindBody);
+
+            // set the request body
+            ByteArrayOutputStream out = new ByteArrayOutputStream();
+            OutputFormat format = new OutputFormat("xml", "UTF-8", true);
+            XMLSerializer serializer = new XMLSerializer(out, format);
+            serializer.asDOMSerializer().serialize(document);
+            setRequestBody(out.toString());
+
+        } catch (ParserConfigurationException e) {
+            throw new IOException(e.getMessage());
+        }
     }
 
+    /**
+     * @see org.apache.commons.httpclient.HttpMethod#getName()
+     */
     public String getName() {
         return DavMethods.METHOD_PROPFIND;
     }

Added: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PropPatchMethod.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PropPatchMethod.java?rev=368683&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PropPatchMethod.java (added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PropPatchMethod.java Fri Jan 13 03:11:35 2006
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * 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.webdav.client.methods;
+
+import org.apache.log4j.Logger;
+import org.apache.jackrabbit.webdav.property.DavPropertySet;
+import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
+import org.apache.jackrabbit.webdav.DavMethods;
+import org.apache.jackrabbit.webdav.DavConstants;
+import org.apache.jackrabbit.webdav.xml.DomUtil;
+import org.apache.xml.serialize.OutputFormat;
+import org.apache.xml.serialize.XMLSerializer;
+import org.w3c.dom.Element;
+import org.w3c.dom.Document;
+
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+/**
+ * <code>PropPatchMethod</code>...
+ */
+public class PropPatchMethod extends DavMethodBase implements DavConstants {
+
+    private static Logger log = Logger.getLogger(PropPatchMethod.class);
+
+    public PropPatchMethod(String uri, DavPropertySet setProperties,
+                           DavPropertyNameSet removeProperties) throws IOException {
+        super(uri);
+        if (setProperties == null || removeProperties == null) {
+            throw new IllegalArgumentException("Neither setProperties nor removeProperties must be null.");
+        }
+
+        try {
+            Document document = BUILDER_FACTORY.newDocumentBuilder().newDocument();
+            Element propupdate = DomUtil.createElement(document, XML_PROPERTYUPDATE, NAMESPACE);
+            // DAV:set
+            Element set = DomUtil.createElement(document, XML_SET, NAMESPACE);
+            set.appendChild(setProperties.toXml(document));
+            // DAV:remove
+            Element remove = DomUtil.createElement(document, XML_REMOVE, NAMESPACE);
+            remove.appendChild(removeProperties.toXml(document));
+
+            propupdate.appendChild(set);
+            propupdate.appendChild(remove);
+            document.appendChild(propupdate);
+
+            ByteArrayOutputStream out = new ByteArrayOutputStream();
+            OutputFormat format = new OutputFormat("xml", "UTF-8", true);
+            XMLSerializer serializer = new XMLSerializer(out, format);
+            serializer.asDOMSerializer().serialize(document);
+            setRequestBody(out.toString());
+        } catch (ParserConfigurationException e) {
+            throw new IOException(e.getMessage());
+        }
+    }
+
+    /**
+     * @see org.apache.commons.httpclient.HttpMethod#getName()
+     */
+    public String getName() {
+        return DavMethods.METHOD_PROPPATCH;
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PropPatchMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PropPatchMethod.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Modified: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/ReportMethod.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/ReportMethod.java?rev=368683&r1=368682&r2=368683&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/ReportMethod.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/ReportMethod.java Fri Jan 13 03:11:35 2006
@@ -20,7 +20,9 @@
 import org.apache.jackrabbit.webdav.version.report.ReportInfo;
 import org.apache.jackrabbit.webdav.header.DepthHeader;
 import org.apache.jackrabbit.webdav.DavMethods;
-import org.jdom.Document;
+import org.apache.jackrabbit.webdav.DavConstants;
+
+import java.io.IOException;
 
 /**
  * <code>ReportMethod</code>...
@@ -29,16 +31,18 @@
 
     private static Logger log = Logger.getLogger(ReportMethod.class);
 
-    public ReportMethod(String uri, ReportInfo reportInfo) {
+    public ReportMethod(String uri, ReportInfo reportInfo) throws IOException {
 	super(uri);
 	DepthHeader dh = new DepthHeader(reportInfo.getDepth());
-	setRequestHeader(dh.getHeaderName(), dh.getHeaderValue());
-	setRequestHeader("Content-Type","text/xml; charset=UTF-8");
+	setRequestHeader(dh);
 
-	Document reportBody = new Document(reportInfo.getReportElement());
-	setRequestBody(reportBody);
+        setRequestHeader(DavConstants.HEADER_CONTENT_TYPE, "text/xml; charset=UTF-8");
+       	setRequestBody(reportInfo);
     }
 
+    /**
+     * @see org.apache.commons.httpclient.HttpMethod#getName()
+     */
     public String getName() {
 	return DavMethods.METHOD_REPORT;
     }

Modified: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/SearchMethod.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/SearchMethod.java?rev=368683&r1=368682&r2=368683&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/SearchMethod.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/SearchMethod.java Fri Jan 13 03:11:35 2006
@@ -19,7 +19,10 @@
 import org.apache.log4j.Logger;
 import org.apache.jackrabbit.webdav.search.SearchInfo;
 import org.apache.jackrabbit.webdav.DavMethods;
-import org.jdom.Namespace;
+import org.apache.jackrabbit.webdav.DavConstants;
+import org.apache.jackrabbit.webdav.xml.Namespace;
+
+import java.io.IOException;
 
 /**
  * <code>SearchMethod</code>...
@@ -28,19 +31,29 @@
 
     private static Logger log = Logger.getLogger(SearchMethod.class);
 
-    public SearchMethod(String uri, String statement, String language) {
-        this(uri, statement, language, Namespace.NO_NAMESPACE);
+    public SearchMethod(String uri, String statement, String language) throws IOException {
+        this(uri, statement, language, Namespace.EMPTY_NAMESPACE);
     }
 
-    public SearchMethod(String uri, String statement, String language, Namespace languageNamespace) {
+    public SearchMethod(String uri, String statement, String language, Namespace languageNamespace) throws IOException {
         super(uri);
         if (language != null && statement != null) {
+            setRequestHeader(DavConstants.HEADER_CONTENT_TYPE, "text/xml; charset=UTF-8");            
             // build the request body
-            SearchInfo sInfo = new SearchInfo(language, languageNamespace, statement);
-            setRequestBody(sInfo.toXml());
+            SearchInfo searchInfo = new SearchInfo(language, languageNamespace, statement);
+            setRequestBody(searchInfo);
         }
     }
     
+    public SearchMethod(String uri, SearchInfo searchInfo) throws IOException {
+        super(uri);
+        setRequestHeader(DavConstants.HEADER_CONTENT_TYPE, "text/xml; charset=UTF-8");
+        setRequestBody(searchInfo);
+    }
+
+    /**
+     * @see org.apache.commons.httpclient.HttpMethod#getName()
+     */
     public String getName() {
         return DavMethods.METHOD_SEARCH;
     }

Added: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/UnLockMethod.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/UnLockMethod.java?rev=368683&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/UnLockMethod.java (added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/UnLockMethod.java Fri Jan 13 03:11:35 2006
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * 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.webdav.client.methods;
+
+import org.apache.log4j.Logger;
+import org.apache.jackrabbit.webdav.DavConstants;
+import org.apache.jackrabbit.webdav.DavMethods;
+import org.apache.jackrabbit.webdav.header.Header;
+import org.apache.jackrabbit.webdav.header.CodedUrlHeader;
+
+/**
+ * <code>UnLockMethod</code>...
+ */
+public class UnLockMethod extends DavMethodBase {
+
+    private static Logger log = Logger.getLogger(UnLockMethod.class);
+
+    public UnLockMethod(String uri, String lockToken) {
+        super(uri);
+        Header lth = new CodedUrlHeader(DavConstants.HEADER_LOCK_TOKEN, lockToken);
+        setRequestHeader(lth);
+    }
+
+    /**
+     * @see org.apache.commons.httpclient.HttpMethod#getName()
+     */
+    public String getName() {
+        return DavMethods.METHOD_UNLOCK;
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/UnLockMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/UnLockMethod.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/UpdateMethod.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/UpdateMethod.java?rev=368683&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/UpdateMethod.java (added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/UpdateMethod.java Fri Jan 13 03:11:35 2006
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * 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.webdav.client.methods;
+
+import org.apache.log4j.Logger;
+import org.apache.jackrabbit.webdav.DavMethods;
+import org.apache.jackrabbit.webdav.version.UpdateInfo;
+
+import java.io.IOException;
+
+/**
+ * <code>UpdateMethod</code>...
+ */
+public class UpdateMethod extends DavMethodBase {
+
+    private static Logger log = Logger.getLogger(UpdateMethod.class);
+
+    public UpdateMethod(String uri, UpdateInfo updateInfo) throws IOException {
+        super(uri);
+        setRequestBody(updateInfo);
+    }
+
+    /**
+     * @see org.apache.commons.httpclient.HttpMethod#getName()
+     */
+    public String getName() {
+        return DavMethods.METHOD_UPDATE;
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/UpdateMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/UpdateMethod.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/VersionControlMethod.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/VersionControlMethod.java?rev=368683&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/VersionControlMethod.java (added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/VersionControlMethod.java Fri Jan 13 03:11:35 2006
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * 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.webdav.client.methods;
+
+import org.apache.log4j.Logger;
+import org.apache.jackrabbit.webdav.DavMethods;
+
+/**
+ * <code>VersionControlMethod</code>...
+ */
+public class VersionControlMethod extends DavMethodBase {
+
+    private static Logger log = Logger.getLogger(VersionControlMethod.class);
+
+    public VersionControlMethod(String uri) {
+        super(uri);
+    }
+
+    /**
+     * @see org.apache.commons.httpclient.HttpMethod#getName()
+     */
+    public String getName() {
+        return DavMethods.METHOD_VERSION_CONTROL;
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/VersionControlMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/VersionControlMethod.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/project.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/project.xml?rev=368683&r1=368682&r2=368683&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/project.xml (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/project.xml Fri Jan 13 03:11:35 2006
@@ -48,11 +48,6 @@
         
         <!-- non-jackrabbit dependencies -->
         <dependency>
-            <groupId>jdom</groupId>
-            <artifactId>jdom</artifactId>
-            <version>1.0</version>
-        </dependency>
-        <dependency>
             <groupId>log4j</groupId>
             <artifactId>log4j</artifactId>
             <version>1.2.8</version>

Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/AbstractWebdavServlet.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/AbstractWebdavServlet.java?rev=368683&r1=368682&r2=368683&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/AbstractWebdavServlet.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/AbstractWebdavServlet.java Fri Jan 13 03:11:35 2006
@@ -15,12 +15,26 @@
  */
 package org.apache.jackrabbit.server;
 
-import org.apache.jackrabbit.webdav.*;
 import org.apache.jackrabbit.server.io.IOUtil;
-import org.apache.jackrabbit.webdav.io.InputContextImpl;
-import org.apache.jackrabbit.webdav.io.OutputContextImpl;
+import org.apache.jackrabbit.webdav.DavConstants;
+import org.apache.jackrabbit.webdav.DavException;
+import org.apache.jackrabbit.webdav.DavLocatorFactory;
+import org.apache.jackrabbit.webdav.DavMethods;
+import org.apache.jackrabbit.webdav.DavResource;
+import org.apache.jackrabbit.webdav.DavResourceFactory;
+import org.apache.jackrabbit.webdav.DavServletRequest;
+import org.apache.jackrabbit.webdav.DavServletResponse;
+import org.apache.jackrabbit.webdav.DavSessionProvider;
+import org.apache.jackrabbit.webdav.MultiStatus;
+import org.apache.jackrabbit.webdav.MultiStatusResponse;
+import org.apache.jackrabbit.webdav.WebdavRequest;
+import org.apache.jackrabbit.webdav.WebdavRequestImpl;
+import org.apache.jackrabbit.webdav.WebdavResponse;
+import org.apache.jackrabbit.webdav.WebdavResponseImpl;
 import org.apache.jackrabbit.webdav.io.InputContext;
+import org.apache.jackrabbit.webdav.io.InputContextImpl;
 import org.apache.jackrabbit.webdav.io.OutputContext;
+import org.apache.jackrabbit.webdav.io.OutputContextImpl;
 import org.apache.jackrabbit.webdav.lock.ActiveLock;
 import org.apache.jackrabbit.webdav.lock.LockInfo;
 import org.apache.jackrabbit.webdav.observation.EventDiscovery;
@@ -29,7 +43,10 @@
 import org.apache.jackrabbit.webdav.observation.SubscriptionInfo;
 import org.apache.jackrabbit.webdav.ordering.OrderPatch;
 import org.apache.jackrabbit.webdav.ordering.OrderingResource;
-import org.apache.jackrabbit.webdav.property.*;
+import org.apache.jackrabbit.webdav.property.DavProperty;
+import org.apache.jackrabbit.webdav.property.DavPropertyName;
+import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
+import org.apache.jackrabbit.webdav.property.DavPropertySet;
 import org.apache.jackrabbit.webdav.search.SearchConstants;
 import org.apache.jackrabbit.webdav.search.SearchInfo;
 import org.apache.jackrabbit.webdav.search.SearchResource;
@@ -48,15 +65,15 @@
 import org.apache.jackrabbit.webdav.version.report.Report;
 import org.apache.jackrabbit.webdav.version.report.ReportInfo;
 import org.apache.log4j.Logger;
-import org.jdom.Document;
+import org.w3c.dom.Document;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
-import java.io.OutputStream;
 import java.io.InputStream;
+import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -152,7 +169,10 @@
             throws ServletException, IOException {
 
         WebdavRequest webdavRequest = new WebdavRequestImpl(request, getLocatorFactory());
-        WebdavResponse webdavResponse = new WebdavResponseImpl(response);
+        // DeltaV requires 'Cache-Control' header for all methods except 'VERSION-CONTROL' and 'REPORT'.
+        int methodCode = DavMethods.getMethodCode(request.getMethod());
+        boolean noCache = DavMethods.isDeltaVMethod(webdavRequest) && !(DavMethods.DAV_VERSION_CONTROL == methodCode || DavMethods.DAV_REPORT == methodCode);
+        WebdavResponse webdavResponse = new WebdavResponseImpl(response, noCache);
         try {
             // make sure there is a authenticated user
             if (!getDavSessionProvider().attachSession(webdavRequest)) {
@@ -165,8 +185,6 @@
                 webdavResponse.sendError(DavServletResponse.SC_PRECONDITION_FAILED);
                 return;
             }
-
-            int methodCode = DavMethods.getMethodCode(webdavRequest.getMethod());
             if (!execute(webdavRequest, webdavResponse, methodCode, resource)) {
                 super.service(request, response);
             }
@@ -314,7 +332,7 @@
         if (oR == null) {
             response.setStatus(DavServletResponse.SC_OK);
         } else {
-            response.sendXmlResponse(oR.toXml(), DavServletResponse.SC_OK);
+            response.sendXmlResponse(oR, DavServletResponse.SC_OK);
         }
     }
 
@@ -388,7 +406,7 @@
      * @throws IOException
      */
     protected void doPropFind(WebdavRequest request, WebdavResponse response,
-                              DavResource resource) throws IOException {
+                              DavResource resource) throws IOException, DavException {
 
         if (!resource.exists()) {
             response.sendError(DavServletResponse.SC_NOT_FOUND);
@@ -852,7 +870,8 @@
         }
         ReportInfo info = request.getReportInfo();
         Report report = ((DeltaVResource) resource).getReport(info);
-        response.sendXmlResponse(report.toXml(), DavServletResponse.SC_OK);
+        int statusCode = (report.isMultiStatusReport()) ? DavServletResponse.SC_MULTI_STATUS : DavServletResponse.SC_OK;
+        response.sendXmlResponse(report, statusCode);
     }
 
     /**
@@ -1006,7 +1025,7 @@
         try {
             Document doc = request.getRequestDocument();
             if (doc != null) {
-                SearchInfo sR = new SearchInfo(doc);
+                SearchInfo sR = SearchInfo.createFromXml(doc.getDocumentElement());
                 response.sendMultiStatus(((SearchResource) resource).search(sR));
             } else {
                 // request without request body is valid if requested resource



Mime
View raw message