jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r782936 - in /jackrabbit/trunk: jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/ jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/ jac...
Date Tue, 09 Jun 2009 09:56:27 GMT
Author: angela
Date: Tue Jun  9 09:56:26 2009
New Revision: 782936

URL: http://svn.apache.org/viewvc?rev=782936&view=rev
Log:
JCR-2133: Remove deprecated classes in jackrabbit-webdav and the corresponding impls in jcr-server

Removed:
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/AbstractWebdavServlet.java
Modified:
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultIOManager.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/AbstractResource.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/DavResourceImpl.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/VersionHistoryResourceImpl.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/VersionResourceImpl.java
    jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/DavResource.java
    jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/DavServletRequest.java
    jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultIOManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultIOManager.java?rev=782936&r1=782935&r2=782936&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultIOManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultIOManager.java
Tue Jun  9 09:56:26 2009
@@ -37,18 +37,6 @@
     }
 
     /**
-     * Creates a new <code>DefaultIOManager</code>. The if the flag is set to
-     * false no <code>IOHandler</code>s are added to the internal list.
-     *
-     * @deprecated Use {@link IOManagerImpl} instead.
-     */
-    protected DefaultIOManager(boolean initDefaults) {
-        if (initDefaults) {
-           init();
-        }
-    }
-
-    /**
      * Add the predefined <code>IOHandler</code>s to this manager. This includes
      * <ul>
      * <li>{@link VersionHistoryHandler}</li>

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/AbstractResource.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/AbstractResource.java?rev=782936&r1=782935&r2=782936&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/AbstractResource.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/AbstractResource.java
Tue Jun  9 09:56:26 2009
@@ -48,8 +48,6 @@
 import org.apache.jackrabbit.webdav.property.DefaultDavProperty;
 import org.apache.jackrabbit.webdav.property.HrefProperty;
 import org.apache.jackrabbit.webdav.property.ResourceType;
-import org.apache.jackrabbit.webdav.property.DavPropertyNameIterator;
-import org.apache.jackrabbit.webdav.property.DavPropertyIterator;
 import org.apache.jackrabbit.webdav.search.QueryGrammerSet;
 import org.apache.jackrabbit.webdav.search.SearchInfo;
 import org.apache.jackrabbit.webdav.search.SearchResource;
@@ -223,31 +221,6 @@
     }
 
     /**
-     * Builds a single List from the properties to set and the properties to
-     * remove and delegates the list to {@link AbstractResource#alterProperties(List)};
-     *
-     * @see DavResource#alterProperties(org.apache.jackrabbit.webdav.property.DavPropertySet,
org.apache.jackrabbit.webdav.property.DavPropertyNameSet)
-     */
-    public MultiStatusResponse alterProperties(DavPropertySet setProperties,
-                                               DavPropertyNameSet removePropertyNames)
-            throws DavException {
-        List changeList = new ArrayList();
-        if (removePropertyNames != null) {
-            DavPropertyNameIterator it = removePropertyNames.iterator();
-            while (it.hasNext()) {
-                changeList.add(it.next());
-            }
-        }
-        if (setProperties != null) {
-            DavPropertyIterator it = setProperties.iterator();
-            while (it.hasNext()) {
-                changeList.add(it.next());
-            }
-        }
-        return alterProperties(changeList);
-    }
-
-    /**
      * Throws {@link DavServletResponse#SC_METHOD_NOT_ALLOWED}
      *
      * @see DavResource#alterProperties(List)

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/DavResourceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/DavResourceImpl.java?rev=782936&r1=782935&r2=782936&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/DavResourceImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/DavResourceImpl.java
Tue Jun  9 09:56:26 2009
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.webdav.simple;
 
 import org.apache.jackrabbit.JcrConstants;
-import org.apache.jackrabbit.uuid.UUID;
 import org.apache.jackrabbit.server.io.AbstractExportContext;
 import org.apache.jackrabbit.server.io.DefaultIOListener;
 import org.apache.jackrabbit.server.io.ExportContext;
@@ -30,6 +29,7 @@
 import org.apache.jackrabbit.server.io.PropertyExportContext;
 import org.apache.jackrabbit.server.io.PropertyImportContext;
 import org.apache.jackrabbit.util.Text;
+import org.apache.jackrabbit.uuid.UUID;
 import org.apache.jackrabbit.webdav.DavCompliance;
 import org.apache.jackrabbit.webdav.DavException;
 import org.apache.jackrabbit.webdav.DavResource;
@@ -42,8 +42,8 @@
 import org.apache.jackrabbit.webdav.MultiStatusResponse;
 import org.apache.jackrabbit.webdav.bind.BindConstants;
 import org.apache.jackrabbit.webdav.bind.BindableResource;
-import org.apache.jackrabbit.webdav.bind.ParentSet;
 import org.apache.jackrabbit.webdav.bind.ParentElement;
+import org.apache.jackrabbit.webdav.bind.ParentSet;
 import org.apache.jackrabbit.webdav.io.InputContext;
 import org.apache.jackrabbit.webdav.io.OutputContext;
 import org.apache.jackrabbit.webdav.jcr.JcrDavException;
@@ -57,10 +57,7 @@
 import org.apache.jackrabbit.webdav.lock.SupportedLock;
 import org.apache.jackrabbit.webdav.lock.Type;
 import org.apache.jackrabbit.webdav.property.DavProperty;
-import org.apache.jackrabbit.webdav.property.DavPropertyIterator;
 import org.apache.jackrabbit.webdav.property.DavPropertyName;
-import org.apache.jackrabbit.webdav.property.DavPropertyNameIterator;
-import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
 import org.apache.jackrabbit.webdav.property.DavPropertySet;
 import org.apache.jackrabbit.webdav.property.DefaultDavProperty;
 import org.apache.jackrabbit.webdav.property.HrefProperty;
@@ -81,11 +78,11 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Date;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.HashSet;
 
 /**
  * DavResourceImpl implements a DavResource.
@@ -128,42 +125,6 @@
      * @param locator
      * @param factory
      * @param session
-     * @deprecated
-     */
-    public DavResourceImpl(DavResourceLocator locator, DavResourceFactory factory,
-                           DavSession session, ResourceConfig config) throws DavException
{
-        JcrDavSession.checkImplementation(session);
-        this.session = (JcrDavSession)session;
-        this.factory = factory;
-        this.locator = locator;
-        this.config = config;
-
-        if (locator != null && locator.getRepositoryPath() != null) {
-            try {
-                Item item = getJcrSession().getItem(locator.getRepositoryPath());
-                if (item != null && item.isNode()) {
-                    node = (Node) item;
-                    // define what is a collection in webdav
-                    isCollection = config.isCollectionResource(node);
-                    initRfc4122Uri();
-                }
-            } catch (PathNotFoundException e) {
-                // ignore: exists field evaluates to false
-            } catch (RepositoryException e) {
-                // some other error
-                throw new JcrDavException(e);
-            }
-        } else {
-            throw new DavException(DavServletResponse.SC_NOT_FOUND);
-        }
-    }
-
-    /**
-     * Create a new {@link DavResource}.
-     *
-     * @param locator
-     * @param factory
-     * @param session
      * @param config
      * @param isCollection
      * @throws DavException
@@ -259,17 +220,6 @@
     }
 
     /**
-     * Package protected method that allows to define whether this resource
-     * represents a collection or not.
-     *
-     * @param isCollection
-     * @deprecated Use the constructor taking a boolean flag instead.
-     */
-    void setIsCollection(boolean isCollection) {
-        this.isCollection = isCollection;
-    }
-
-    /**
      * @see org.apache.jackrabbit.webdav.DavResource#getLocator()
      */
     public DavResourceLocator getLocator() {
@@ -456,28 +406,6 @@
         }
     }
 
-    /**
-     * @see DavResource#alterProperties(DavPropertySet, DavPropertyNameSet)
-     */
-    public MultiStatusResponse alterProperties(DavPropertySet setProperties,
-                                               DavPropertyNameSet removePropertyNames)
-            throws DavException {
-        List changeList = new ArrayList();
-        if (removePropertyNames != null) {
-            DavPropertyNameIterator it = removePropertyNames.iterator();
-            while (it.hasNext()) {
-                changeList.add(it.next());
-            }
-        }
-        if (setProperties != null) {
-            DavPropertyIterator it = setProperties.iterator();
-            while (it.hasNext()) {
-                changeList.add(it.next());
-            }
-        }
-        return alterProperties(changeList);
-    }
-
     public MultiStatusResponse alterProperties(List changeList) throws DavException {
         if (isLocked(this)) {
             throw new DavException(DavServletResponse.SC_LOCKED);

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/VersionHistoryResourceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/VersionHistoryResourceImpl.java?rev=782936&r1=782935&r2=782936&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/VersionHistoryResourceImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/VersionHistoryResourceImpl.java
Tue Jun  9 09:56:26 2009
@@ -31,8 +31,6 @@
 import org.apache.jackrabbit.webdav.property.ResourceType;
 import org.apache.jackrabbit.webdav.property.DavProperty;
 import org.apache.jackrabbit.webdav.property.DavPropertyName;
-import org.apache.jackrabbit.webdav.property.DavPropertySet;
-import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
 import org.apache.jackrabbit.webdav.version.VersionHistoryResource;
 import org.apache.jackrabbit.webdav.version.VersionResource;
 import org.slf4j.Logger;
@@ -156,15 +154,6 @@
     /**
      * Version storage is read-only -> fails with 403.
      *
-     * @see DavResource#alterProperties(DavPropertySet, DavPropertyNameSet)
-     */
-    public MultiStatusResponse alterProperties(DavPropertySet setProperties, DavPropertyNameSet
removePropertyNames) throws DavException {
-        throw new DavException(DavServletResponse.SC_FORBIDDEN);
-    }
-
-    /**
-     * Version storage is read-only -> fails with 403.
-     *
      * @see DavResource#alterProperties(List)
      */
     public MultiStatusResponse alterProperties(List changeList) throws DavException {

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/VersionResourceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/VersionResourceImpl.java?rev=782936&r1=782935&r2=782936&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/VersionResourceImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/VersionResourceImpl.java
Tue Jun  9 09:56:26 2009
@@ -32,8 +32,6 @@
 import org.apache.jackrabbit.webdav.property.DefaultDavProperty;
 import org.apache.jackrabbit.webdav.property.HrefProperty;
 import org.apache.jackrabbit.webdav.property.DavProperty;
-import org.apache.jackrabbit.webdav.property.DavPropertySet;
-import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
 import org.apache.jackrabbit.webdav.version.LabelInfo;
 import org.apache.jackrabbit.webdav.version.LabelSetProperty;
 import org.apache.jackrabbit.webdav.version.VersionHistoryResource;
@@ -138,15 +136,6 @@
     /**
      * Version storage is read-only -> fails with 403.
      *
-     * @see DavResource#alterProperties(DavPropertySet, DavPropertyNameSet)
-     */
-    public MultiStatusResponse alterProperties(DavPropertySet setProperties, DavPropertyNameSet
removePropertyNames) throws DavException {
-        throw new DavException(DavServletResponse.SC_FORBIDDEN);
-    }
-
-    /**
-     * Version storage is read-only -> fails with 403.
-     *
      * @see DavResource#alterProperties(List)
      */
     public MultiStatusResponse alterProperties(List changeList) throws DavException {

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/DavResource.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/DavResource.java?rev=782936&r1=782935&r2=782936&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/DavResource.java
(original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/DavResource.java
Tue Jun  9 09:56:26 2009
@@ -25,7 +25,6 @@
 import org.apache.jackrabbit.webdav.lock.Type;
 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 java.io.IOException;
@@ -165,22 +164,6 @@
     public void removeProperty(DavPropertyName propertyName) throws DavException;
 
     /**
-     * Set/add the specified properties and remove the properties with the given
-     * names from this resource respectively.
-     *
-     * @param setProperties Set of properties to be added or modified
-     * @param removePropertyNames Set of property names to be removed
-     * @return multistatus response listing the status resulting from
-     * setting and/or removing the specified properties, in order to allow a
-     * detailed multistatus response.
-     * @throws DavException if an error occurred. This may be the case if the
-     * general state of the resource prevents any properties to be set or removed
-     * (e.g. due to a lock).
-     * @deprecated use {@link #alterProperties(List)} instead
-     */
-    public MultiStatusResponse alterProperties(DavPropertySet setProperties, DavPropertyNameSet
removePropertyNames) throws DavException;
-
-    /**
      * Set/add and remove the specified properties from this resource.
      *
      * @param changeList list containing {@link DavPropertyName} objects (for

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/DavServletRequest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/DavServletRequest.java?rev=782936&r1=782935&r2=782936&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/DavServletRequest.java
(original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/DavServletRequest.java
Tue Jun  9 09:56:26 2009
@@ -18,7 +18,6 @@
 
 import org.apache.jackrabbit.webdav.lock.LockInfo;
 import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
-import org.apache.jackrabbit.webdav.property.DavPropertySet;
 import org.apache.jackrabbit.webdav.property.DavProperty;
 import org.apache.jackrabbit.webdav.property.DavPropertyName;
 import org.w3c.dom.Document;
@@ -153,43 +152,15 @@
     public DavPropertyNameSet getPropFindProperties() throws DavException;
 
     /**
-     * Return the set of properties the client wanted to modify / create with a
-     * PROPPATCH request, i.e. all entries in the &lt;propertyupdate&gt; element
-     * of the request body with name &lt;set&gt;.
+     * Return a {@link List} of property change operations. Each entry
+     * is either of type {@link DavPropertyName}, indicating a &lt;remove&gt;
+     * operation, or of type {@link DavProperty}, indicating a &lt;set&gt;
+     * operation. Note that ordering is significant here.
      *
-     * @return set of properties the client wanted to modify / create with a
-     * PROPPATCH request.
+     * @return {@link List} of property change operations
      * @throws DavException In case of invalid request body
-     * @deprecated use {@link #getPropPatchChangeList()} instead
      */
-    public DavPropertySet getPropPatchSetProperties() throws DavException;
-
-    /**
-     * Return the set of property names the client wanted to remove with a
-     * PROPPATCH request, i.e. all entries in the &lt;propertyupdate&gt; element
-     * of the request body with name &lt;remove&gt;.<br>
-     * Note, that in constrast to the &lt;set&gt; Xml element, all the XML
-     * elements in a prop XML element inside of a remove XML element must be
-     * empty, as only the names of properties to be removed are required. Therefore
-     * a <code>DavPropertyNameSet</code> is returned and not a <code>DavPropertySet</code>
-     *
-     * @return set of property names the client wanted to remove with a
-     * PROPPATCH request.
-     * @throws DavException In case of invalid request body
-     * @deprecated use {@link #getPropPatchChangeList()} instead
-     */
-    public DavPropertyNameSet getPropPatchRemoveProperties() throws DavException;
-
-     /**
-      * Return a {@link List} of property change operations. Each entry
-      * is either of type {@link DavPropertyName}, indicating a &lt;remove&gt;
-      * operation, or of type {@link DavProperty}, indicating a &lt;set&gt;
-      * operation. Note that ordering is significant here.
-      *
-      * @return {@link List} of property change operations
-      * @throws DavException In case of invalid request body
-      */
-     public List getPropPatchChangeList() throws DavException;
+    public List getPropPatchChangeList() throws DavException;
 
     /**
      * Return the parsed 'lockinfo' request body, the {@link DavConstants#HEADER_TIMEOUT

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java?rev=782936&r1=782935&r2=782936&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java
Tue Jun  9 09:56:26 2009
@@ -422,38 +422,6 @@
         }   
     }
 
-    /**
-     * Return the list of 'set' entries in the PROPPATCH request body. The list
-     * is empty if the request body could not be parsed or if the request body did
-     * not contain any 'set' elements.
-     *
-     * @return the list of 'set' entries in the PROPPATCH request body
-     * @see DavServletRequest#getPropPatchSetProperties()
-     * @deprecated use {@link #getPropPatchChangeList()} instead
-     */
-    public DavPropertySet getPropPatchSetProperties() throws DavException {
-        if (proppatchSet == null) {
-            parsePropPatchRequest();
-        }
-        return proppatchSet;
-    }
-
-    /**
-     * Return the list of 'remove' entries in the PROPPATCH request body. The list
-     * is empty if the request body could not be parsed or if the request body did
-     * not contain any 'remove' elements.
-     *
-     * @return the list of 'remove' entries in the PROPPATCH request body
-     * @see DavServletRequest#getPropPatchRemoveProperties()
-     * @deprecated use {@link #getPropPatchChangeList()} instead
-     */
-    public DavPropertyNameSet getPropPatchRemoveProperties() throws DavException {
-        if (proppatchRemove == null) {
-            parsePropPatchRequest();
-        }
-        return proppatchRemove;
-    }
-
      /**
       * Return a {@link List} of property change operations. Each entry
       * is either of type {@link DavPropertyName}, indicating a &lt;remove&gt;



Mime
View raw message